mirror of
https://github.com/corda/corda.git
synced 2024-12-18 20:47:57 +00:00
CORDA-3246 - Missing logs on shutdown (#5501)
* Disabled shutdown hook on log4j2 as se are calling LogManager.shutdown manually and having multiple shutdowns breaks the logic and misses flushing out events. * Added docs entry about shutdownHook needing to be disabled in case of a config override. * Changes according to PR. * More changes according to PR. * Changed note according to PR review.
This commit is contained in:
parent
ec4d20d987
commit
31014e1022
@ -1,5 +1,5 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<Configuration status="info" packages="net.corda.common.logging">
|
||||
<Configuration status="info" packages="net.corda.common.logging" shutdownHook="disable">
|
||||
|
||||
<Properties>
|
||||
<Property name="log-path">${sys:log-path:-logs}</Property>
|
||||
|
@ -25,6 +25,11 @@ If you need to switch to synchronous logging (e.g. for debugging/testing purpose
|
||||
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`).
|
||||
|
||||
.. warning:: Ensure that ``shutdownHook="disable"`` is set if you are overriding the log4j2 configuration file
|
||||
otherwise logs will not be flushed properly on shutdown and loss may occur. The option is set in the ``Configuration``
|
||||
tag of the log4j configuration file, for example ``<Configuration ... shutdownHook="disable">``. This is because
|
||||
Corda overrides the default log4j2 shutdown logic in order to make sure it gets shut down correctly.
|
||||
|
||||
Example
|
||||
+++++++
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user