From b4dd4ef83a51bc91a5861c0dd2809263e60cd05d Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Tue, 10 Nov 2009 13:50:07 +0100 Subject: doc: added reasoning for why use env vars to configure debug system --- doc/debug.html | 24 ++++++++++++++++++++++-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/doc/debug.html b/doc/debug.html index 3803be1a..46759986 100644 --- a/doc/debug.html +++ b/doc/debug.html @@ -1,5 +1,6 @@ - + + Rsyslog Debug Support @@ -51,6 +52,24 @@ debug output itself. You need to send SIGUSR1 to turn it on when desired.
  • help - display a very short list of commands - hopefully a life saver if you can't access the documentation...
  • +

    Why Environment Variables?

    +

    You may ask why we use environment variables for debug-system parameters and not +the usual rsyslog.conf configuration commands. After all, environment variables force one +to change distro-specific configuration files, whereas regular configuration directives +would fit nicely into the one central rsyslog.conf. +

    The problem here is that many settings of the debug system must be initialized +before the full rsyslog engine starts up. At that point, there is no such thing like +rsyslog.conf or the objects needed to process it present in an running instance. +And even if we would enable to change settings some time later, that would mean that +we can not correctly monitor (and debug) the initial startup phase of rsyslogd. What +makes matters worse is that during this startup phase (and never again later!) some +of the base debug structure needs to be created, at least if the build is +configured for that (many of these things only happen in --enable-rtinst mode). So +if we do not initialize the debug system before actually startig up the +rsyslog core, we get a number of data structures wrong. +

    For these reasons, we utilize environment variables to initialize and configure +the debugging system. We understand this may be somewhat painful, but now you know +there are at least some good reasons for doing so.

    Getting debug information from a running Instance

    It is possible to obtain debugging information from a running instance, but this requires some setup. We assume that the instance runs in the background, so debug output to @@ -122,4 +141,5 @@ instance of rsyslogd can be aborted by pressing ctl-c. Copyright © 2008, 2009 by Rainer Gerhards and Adiscon. Released under the GNU GPL version 3 or higher.

    - + + -- cgit