From 217859bd5ffd77988fab587d1bed9e29cb8c025a Mon Sep 17 00:00:00 2001 From: brusdev Date: Wed, 18 Dec 2019 10:22:28 +0100 Subject: [PATCH] ARTEMIS-2579 [DOC] How to use custom logging handlers Add the documentation to use custom logging handlers. --- docs/user-manual/en/logging.md | 11 +++++++++++ docs/user-manual/en/using-server.md | 7 +++++++ 2 files changed, 18 insertions(+) diff --git a/docs/user-manual/en/logging.md b/docs/user-manual/en/logging.md index aa76e7a338..3ad23e3938 100644 --- a/docs/user-manual/en/logging.md +++ b/docs/user-manual/en/logging.md @@ -125,4 +125,15 @@ Turn on this audit logger may affect the performance. Once enabled, all audit records are written into a separate log file (by default audit.log). +## Use Custom Handlers +To use a different handler than the built-in ones, you either pick one from +existing libraries or you implement it yourself. All handlers must extends the +java.util.logging.Handler class. + +To enable a custom handler you need to append it to the handlers list +`logger.handlers` and add its configuration to the `logging.configuration`. + +Last but not least, once you get your own handler please [add it to the boot +classpath](using-server.md#adding-bootstrap-dependencies) otherwise the log +manager will fail to load it! diff --git a/docs/user-manual/en/using-server.md b/docs/user-manual/en/using-server.md index 845c66cdc2..03f271d516 100644 --- a/docs/user-manual/en/using-server.md +++ b/docs/user-manual/en/using-server.md @@ -473,6 +473,13 @@ use the following command to install it: The create process should give you a hint of the available commands available for the artemis-service.exe +## Adding Bootstrap Dependencies + +Bootstrap dependencies like logging handlers must be accessible by the log +manager at boot time. Package the dependency in a jar and put it on the boot +classpath before of log manager jar. This can be done appending the jar at the +variable `JAVA_ARGS`, defined in `artemis.profile`, with the option `-Xbootclasspath/a`. + ## Adding Runtime Dependencies Runtime dependencies like diverts, transformers, broker plugins, JDBC drivers,