diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-10 12:53:04 +0100 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2009-11-10 12:53:04 +0100 |
commit | 384de6a4429436c981ad2dc87f4341dae767a89c (patch) | |
tree | a2a7be6836208acb3fc8fbd87b95870cdf21d549 /tools | |
parent | 2759e1dd846cb4e3bef78a849005afc8d0fa7438 (diff) | |
parent | 2b5e15d549940c7ace9017eaf40d523e3741c9a2 (diff) | |
download | rsyslog-384de6a4429436c981ad2dc87f4341dae767a89c.tar.gz rsyslog-384de6a4429436c981ad2dc87f4341dae767a89c.tar.xz rsyslog-384de6a4429436c981ad2dc87f4341dae767a89c.zip |
Merge branch 'v4-beta'
Conflicts:
ChangeLog
Diffstat (limited to 'tools')
-rw-r--r-- | tools/syslogd.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/tools/syslogd.c b/tools/syslogd.c index eef3bb82..eeeb4aeb 100644 --- a/tools/syslogd.c +++ b/tools/syslogd.c @@ -733,13 +733,27 @@ doFlushRptdMsgs(void) static void debug_switch() { + time_t tTime; + struct tm tp; struct sigaction sigAct; + time(&tTime); + localtime_r(&tTime, &tp); if(debugging_on == 0) { debugging_on = 1; - DBGPRINTF("Switching debugging_on to true\n"); + dbgprintf("\n"); + dbgprintf("\n"); + dbgprintf("********************************************************************************\n"); + dbgprintf("Switching debugging_on to true at %2.2d:%2.2d:%2.2d\n", + tp.tm_hour, tp.tm_min, tp.tm_sec); + dbgprintf("********************************************************************************\n"); } else { - DBGPRINTF("Switching debugging_on to false\n"); + dbgprintf("********************************************************************************\n"); + dbgprintf("Switching debugging_on to false at %2.2d:%2.2d:%2.2d\n", + tp.tm_hour, tp.tm_min, tp.tm_sec); + dbgprintf("********************************************************************************\n"); + dbgprintf("\n"); + dbgprintf("\n"); debugging_on = 0; } @@ -2310,8 +2324,6 @@ doGlblProcessInit(void) fputs(" Already running.\n", stderr); exit(1); /* "good" exit, done if syslogd is already running */ } - } else { - debugging_on = 1; } /* tuck my process id away */ |