diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-28 16:16:01 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-28 16:16:01 +0000 |
commit | dd9e6950e9dafe3d81c444b18968804666d78d7c (patch) | |
tree | f40ffee731108be823d089e2bab9c15e24d860ef | |
parent | 1ad40ecdd869b35798f674b401ea3076116aec83 (diff) | |
download | rsyslog-dd9e6950e9dafe3d81c444b18968804666d78d7c.tar.gz rsyslog-dd9e6950e9dafe3d81c444b18968804666d78d7c.tar.bz2 rsyslog-dd9e6950e9dafe3d81c444b18968804666d78d7c.zip |
added "help" command to runtime debug flags
-rw-r--r-- | ChangeLog | 2 | ||||
-rw-r--r-- | debug.c | 20 | ||||
-rw-r--r-- | doc/debug.html | 2 |
3 files changed, 22 insertions, 2 deletions
@@ -1,5 +1,7 @@ --------------------------------------------------------------------------- Version 3.12.1 (rgerhards), 2008-0?-?? +- improved debugging support; debug runtime options can now be set via + an environment variable - bugfix: removed debugging code that I forgot to remove before releasing 3.12.0 (does not cause harm and happened only during startup) --------------------------------------------------------------------------- @@ -1133,7 +1133,25 @@ dbgGetRuntimeOptions(void) if((pszOpts = (uchar*) getenv("RSYSLOG_DEBUG")) != NULL) { /* we have options set, so let's process them */ while(dbgGetRTOptNamVal(&pszOpts, &optname, &optval)) { - if(!strcasecmp((char*)optname, "logfuncflow")) { + if(!strcasecmp((char*)optname, "help")) { + fprintf(stderr, + "rsyslogd runtime debug support - help requested, rsyslog terminates\n\n" + "environment variables:\n" + "addional logfile: export RSYSLOG_DEBUGFILE=\"/path/to/file\"\n" + "to set: export RSYSLOG_DEBUG=\"cmd cmd cmd\"\n\n" + "Commands are (all case-insensitive):\n" + "help (this list, terminates rsyslogd\n" + "LogFuncFlow\n" + "LogAllocFree (very partly implemented)\n" + "PrintFuncDB\n" + "PrintMutexAction\n" + "PrintAllDebugInfoOnExit (not yet implemented)\n" + "NoLogTimestamp\n" + "Nostdoout\n" + "filetrace=file (may be provided multiple times)\n" + "\nSee debug.html in your doc set or http://www.rsyslog.com for details\n"); + exit(1); + } else if(!strcasecmp((char*)optname, "logfuncflow")) { bLogFuncFlow = 1; } else if(!strcasecmp((char*)optname, "logallocfree")) { bLogAllocFree = 1; diff --git a/doc/debug.html b/doc/debug.html index ae163eb4..de77f04a 100644 --- a/doc/debug.html +++ b/doc/debug.html @@ -27,7 +27,7 @@ options possible (all are case insensitive):</p><ul><li><span style="font-weight set (the default), a LogFuncFlow trace is provided for all files. Set to limit it to the files specified. FileTrace may be specified multiple times, one file each (e.g. export RSYSLOG_DEBUG="LogFuncFlow -FileTrace=vm.c FileTrace=expr.c"</li><li><span style="font-weight: bold;">PrintFuncDB</span> - print the content of the debug function database whenever debug information is printed (e.g. abort case)!</li><li><span style="font-weight: bold;">PrintAllDebugInfoOnExit</span> - print all debug information immediately before rsyslogd exits (<span style="font-weight: bold; font-style: italic;">currently not implemented!</span>)</li><li><span style="font-weight: bold;">PrintMutexAction</span> - print mutex action as it happens. Useful for finding deadlocks and such.</li><li><span style="font-weight: bold;">NoLogTimeStamp</span> - do not prefix log lines with a timestamp (default is to do that).</li><li><span style="font-weight: bold;">NoStdOut</span> - do not emit debug messages to stdout. If RSYSLOG_DEBUGLOG is not set, this means no messages will be displayed at all.</li></ul> +FileTrace=vm.c FileTrace=expr.c"</li><li><span style="font-weight: bold;">PrintFuncDB</span> - print the content of the debug function database whenever debug information is printed (e.g. abort case)!</li><li><span style="font-weight: bold;">PrintAllDebugInfoOnExit</span> - print all debug information immediately before rsyslogd exits (<span style="font-weight: bold; font-style: italic;">currently not implemented!</span>)</li><li><span style="font-weight: bold;">PrintMutexAction</span> - print mutex action as it happens. Useful for finding deadlocks and such.</li><li><span style="font-weight: bold;">NoLogTimeStamp</span> - do not prefix log lines with a timestamp (default is to do that).</li><li><span style="font-weight: bold;">NoStdOut</span> - do not emit debug messages to stdout. If RSYSLOG_DEBUGLOG is not set, this means no messages will be displayed at all.</li><li><span style="font-weight: bold;">help</span> - display a very short list of commands - hopefully a life saver if you can't access the documentation...</li></ul> <ul> </ul> <p>[<a href="manual.html">manual index</a>] [<a href="http://www.rsyslog.com/">rsyslog site</a>]</p> |