From a7eb97b930bbbd3133f336a6f2ccbfb55eebbcfb Mon Sep 17 00:00:00 2001 From: Rainer Gerhards Date: Fri, 29 Feb 2008 16:02:07 +0000 Subject: - added "debug" command to debug environment settings - changed the object/interface system to use a new way of calling, giving up the numerical object ID. This was necessary as we needed more extensibility for third-party modules (which don't play at all with the previous fixed object ID). This is stage work for the object loader. Please note that I needed to change the object (de)serializer, I can't outrule that I have introduced bugs there. --- debug.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'debug.c') diff --git a/debug.c b/debug.c index a13f7e61..d1e037f0 100644 --- a/debug.c +++ b/debug.c @@ -1152,6 +1152,12 @@ dbgGetRuntimeOptions(void) "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, "debug")) { + /* this is earlier in the process than the -d option, as such it + * allows us to spit out debug messages from the very beginning. + */ + Debug = 1; + debugging_on = 1; } else if(!strcasecmp((char*)optname, "logfuncflow")) { bLogFuncFlow = 1; } else if(!strcasecmp((char*)optname, "logallocfree")) { @@ -1176,9 +1182,8 @@ dbgGetRuntimeOptions(void) dbgPrintNameAdd(optval, &printNameFileRoot); } } else { - fprintf(stderr, "Error: invalid debug option '%s', value '%s'\n", + fprintf(stderr, "Error: invalid debug option '%s', value '%s' - ignored\n", optval, optname); - exit(1); } } } -- cgit