diff --git a/modules/setup-dev-environment/pages/logging.adoc b/modules/setup-dev-environment/pages/logging.adoc index 519d02a6a0..f4e016aca1 100644 --- a/modules/setup-dev-environment/pages/logging.adoc +++ b/modules/setup-dev-environment/pages/logging.adoc @@ -46,6 +46,63 @@ Here is an example of the Log4j2 configuration for the logger used in the exampl ---- + +==== Use JSON format for logs + +The default configuration contains an unused `Console-JSON` appender which formats logs as JSON. + +[source, xml] +---- + + + + + + + + + +---- + +To use it, you can update the `AppenderRef` in the `Loggers` block or add a new one. + +[source, xml] +---- + + + + + +---- + +==== Stream logs to a remote server + +You need to declare a Socket appender in `log4j-appenders.xml` to stream to a remote server. You can choose to use Socket with various formats, such as JSONLayout or PatternLayout. + +As example, this configuration is used to stream JSON-formatted log entries to a remote server, such as Logstash, for further processing and analysis. + +[source, xml] +---- + + + + + +---- + +Then, do not forget to reference this new appender in `Loggers` block: + +[source, xml] +---- + + + + + + + +---- + === Bonita Studio To change the Bonita Studio log level (usually to debug Studio), go to the Studio installation folder, configuration directory, and edit the `config.ini` file. You need to set the property `eclipse.log.level` to one of the following values: INFO, WARNING or ERROR.