From 4e67a979a03a18483f3a5219c4aca8451f3f363d Mon Sep 17 00:00:00 2001 From: Richard Green Date: Fri, 10 Nov 2017 15:50:01 +0000 Subject: [PATCH] Added some more details regarding setting log levels for individual modules --- docs/source/node-administration.rst | 40 ++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/docs/source/node-administration.rst b/docs/source/node-administration.rst index 6410ed4076..6e2f72abad 100644 --- a/docs/source/node-administration.rst +++ b/docs/source/node-administration.rst @@ -10,9 +10,43 @@ Logging By default the node log files are stored to the ``logs`` subdirectory of the working directory and are rotated from time to time. You can have logging printed to the console as well by passing the ``--log-to-console`` command line flag. -The default logging level is ``INFO`` which can be adjusted by the ``--logging-level`` command line argument. For more -custom logging, the logger settings can be completely overridden with a `Log4j 2 `_ -configuration file assigned to the ``log4j.configurationFile`` system property. +The default logging level is ``INFO`` which can be adjusted by the ``--logging-level`` command line argument. This configuration +option will affect all modules. + +It may be the case that you require to amend the log level of a particular subset of modules (e.g. if you'd like to take a +closer look at hibernate activity). So, for more bespoke logging configuration, the logger settings can be completely overridden +with a `Log4j 2 `_ configuration file assigned to the ``log4j.configurationFile`` system property. + +Example ++++++++ + +Create a file ``sql.xml`` in the current working directory. Add the following text : + +.. code-block:: xml + + + + + + + + + + + + + + + + + + +Note the addition of a logger named ``org.hibernate`` that has set this particular logger level to ``debug``. + +Now start the node as usual but with the additional parameter ``log4j.configurationFile`` set to the filename as above, e.g. + +``java -Dlog4j.configurationFile=sql.xml -jar corda.jar`` + Database access ---------------