mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
Corda-1931 Asynchronous logging (#3989)
* Provide AsyncLoggingContextSelector that inhibits use of thread local storage * Turn on async logging via log4j properties file * Mention async logging in the documentation and also explain how to turn it off when required. * Formatting * Typo * Add shutdown hook to flush loggers. * code review rework * Ring buffer size to 256kB * Set maximal log file size to 100MB - should slow down the rolling of log files and give us a bit more history on the cluster. The old limit of max 10GB of compressed log files still stands.
This commit is contained in:
@ -13,6 +13,12 @@ It may be the case that you require to amend the log level of a particular subse
|
||||
closer look at hibernate activity). So, for more bespoke logging configuration, the logger settings can be completely overridden
|
||||
with a `Log4j 2 <https://logging.apache.org/log4j/2.x>`_ configuration file assigned to the ``log4j.configurationFile`` system property.
|
||||
|
||||
The node is using log4j asynchronous logging by default (configured via log4j2 properties file in its resources)
|
||||
to ensure that log message flushing is not slowing down the actual processing.
|
||||
If you need to switch to synchronous logging (e.g. for debugging/testing purposes), you can override this behaviour
|
||||
by adding ``-DLog4jContextSelector=org.apache.logging.log4j.core.selector.ClassLoaderContextSelector`` to the node's
|
||||
command line or to the ``jvmArgs`` section of the node configuration (see :doc:`corda-configuration-file`).
|
||||
|
||||
Example
|
||||
+++++++
|
||||
|
||||
|
Reference in New Issue
Block a user