From f2917fc34162cf91b6c6b36020bcc596b9893ac6 Mon Sep 17 00:00:00 2001 From: Morten Brekkevold Date: Fri, 11 Aug 2023 13:47:10 +0200 Subject: [PATCH] Document how to use NAV_LOGGING_CONF envvar --- doc/howto/setting-up-logging.rst | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/doc/howto/setting-up-logging.rst b/doc/howto/setting-up-logging.rst index 84f4d0cbed..7e0b9195cb 100644 --- a/doc/howto/setting-up-logging.rst +++ b/doc/howto/setting-up-logging.rst @@ -76,6 +76,39 @@ log output from the PortAdmin web tool into the :file:`portadmin.log` file, in the directory configured by the :file:`nav.conf` ``LOG_DIR`` option. +Using different logging config for individual programs +====================================================== + +While all NAV programs will look for :file:`logging.conf` in NAV's default +configuration file directories, you can run individual NAV programs with an +explicit logging configuration file that is separate from the standard one. + +A typical usage scenario might be that you want to run a single +:program:`ipdevpoll` job with more debug logging, without having the logging +configuration changes affect the :program:`ipdevpolld` daemon running all your +jobs in the background. This can be achieved by setting the +:envvar:`NAV_LOGGING_CONF` environment variable to point to a different logging +config file before running :program:`ipdevpolld` from the command line. + +.. code-block:: console + + $ cat > /tmp/logging.conf <