summaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-28 16:16:01 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-28 16:16:01 +0000
commitdd9e6950e9dafe3d81c444b18968804666d78d7c (patch)
treef40ffee731108be823d089e2bab9c15e24d860ef /debug.c
parent1ad40ecdd869b35798f674b401ea3076116aec83 (diff)
downloadrsyslog-dd9e6950e9dafe3d81c444b18968804666d78d7c.tar.gz
rsyslog-dd9e6950e9dafe3d81c444b18968804666d78d7c.tar.xz
rsyslog-dd9e6950e9dafe3d81c444b18968804666d78d7c.zip
added "help" command to runtime debug flags
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c20
1 files changed, 19 insertions, 1 deletions
diff --git a/debug.c b/debug.c
index 110fa09c..4272f9d6 100644
--- a/debug.c
+++ b/debug.c
@@ -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;