This is an automated email from the ASF dual-hosted git repository. robbie pushed a commit to branch new-logging in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
commit 193d9c6acdd59fe6c1bc30df2dceb83a3ad778e9 Author: Robbie Gemmell <[email protected]> AuthorDate: Thu Sep 15 17:27:17 2022 +0100 some more doc updates around monitorInterval --- docs/user-manual/en/config-reload.md | 4 ++++ docs/user-manual/en/logging.md | 17 ++++++++++++++++- docs/user-manual/en/versions.md | 4 ++-- 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/docs/user-manual/en/config-reload.md b/docs/user-manual/en/config-reload.md index ed2e0a677a..d88658df0a 100644 --- a/docs/user-manual/en/config-reload.md +++ b/docs/user-manual/en/config-reload.md @@ -4,6 +4,10 @@ The system will perform a periodic check on the configuration files, configured by `configuration-file-refresh-period`, with the default at `5000`, in milliseconds. These checks can be disabled by specifying `-1`. +Note that the Log4J2 configuration has its own reload mechanism, configured via its own +log4j2.properties file. See [Logging configuration reload](logging.md#configuration-reload) +for more detail. + Once the configuration file is changed (broker.xml) the following modules will be reloaded automatically: diff --git a/docs/user-manual/en/logging.md b/docs/user-manual/en/logging.md index 7faf9a3912..70305ec529 100644 --- a/docs/user-manual/en/logging.md +++ b/docs/user-manual/en/logging.md @@ -34,6 +34,18 @@ logger.my_logger_ref.name=org.foo my_logger_ref.level=TRACE ``` +## Configuration Reload + +Log4J2 has its own configuration file reloading mechanism, which is itself configured via +the same log4j2.properties configuration file. To enable reload upon configuration updates, +set the `monitorInterval` config property to the interval in seconds that the file should +be monitored for updates, e.g: + +``` +# Monitor config file every 5 seconds for updates +monitorInterval = 5 +``` + ## Logging in a client application Firstly, if you want to enable logging on the client side you need to @@ -64,11 +76,14 @@ property `log4j2.configurationFile`, e.g.: -Dlog4j2.configurationFile=file:///path/to/custom-log4j2-config.properties ``` -The following is an example `log4j2.properties` for a client +The following is an example `log4j2.properties` for a client application. ``` # Log4J 2 configuration +# Monitor config file every X seconds for updates +monitorInterval = 5 + rootLogger = INFO, console, log_file logger.activemq.name=org.apache.activemq diff --git a/docs/user-manual/en/versions.md b/docs/user-manual/en/versions.md index 80ac343392..e12e18b321 100644 --- a/docs/user-manual/en/versions.md +++ b/docs/user-manual/en/versions.md @@ -19,8 +19,8 @@ Highlights: 1. <instance>/etc/logging.properties removal 2. <instance>/etc/log4j2.properties creation 3. Related script or profile changes - 4. The brokers ConfigurationFileRefreshPeriod no longer covers logging configuration. Log4J2 has its own - config reload handling, configured via the monitorInterval property in the log4j2.properties file. + 4. The brokers configuration-file-refresh-period no longer covers logging configuration refresh. Log4J2 has + its own config reload handling, configured via the monitorInterval property in the log4j2.properties file. The etc/log4j2.properties file has a 5 second monitorInterval set to align with the prior behaviour. ## 2.25.0
