mirror of
https://github.com/rsyslog/rsyslog.git
synced 2025-12-18 05:10:43 +01:00
Merge branch 'v4-devel' into tmp
Conflicts: ChangeLog tests/Makefile.am tests/sndrcv_drvr.sh tools/syslogd.c
This commit is contained in:
commit
4e3589857a
@ -277,9 +277,13 @@ Version 4.7.0 [v4-devel] (rgerhards), 2009-09-??
|
||||
- added new config directive $omfileForceChown to (try to) fix some broken
|
||||
system configs.
|
||||
See ticket for details: http://bugzilla.adiscon.com/show_bug.cgi?id=150
|
||||
- imported changes from 4.5.6 and below
|
||||
- added option to use unlimited-size select() calls
|
||||
Thanks to varmjofekoj for the patch
|
||||
- debugondemand mode caused backgrounding to fail - close to a bug, but I'd
|
||||
consider the ability to background in this mode a new feature...
|
||||
- imported changes from 4.5.7 and below
|
||||
---------------------------------------------------------------------------
|
||||
Version 4.5.7 [v4-beta] (rgerhards), 2009-11-??
|
||||
Version 4.5.7 [v4-beta] (rgerhards), 2009-11-18
|
||||
- added a so-called "On Demand Debug" mode, in which debug output can
|
||||
be generated only after the process has started, but not right from
|
||||
the beginning. This is assumed to be useful for hard-to-find bugs.
|
||||
|
||||
@ -1308,11 +1308,11 @@ dbgGetRuntimeOptions(void)
|
||||
/* 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;
|
||||
Debug = DEBUG_FULL;
|
||||
debugging_on = 1;
|
||||
} else if(!strcasecmp((char*)optname, "debugondemand")) {
|
||||
/* Enables debugging, but turns off debug output */
|
||||
Debug = 1;
|
||||
Debug = DEBUG_ONDEMAND;
|
||||
debugging_on = 1;
|
||||
dbgprintf("Note: debug on demand turned on via configuraton file, "
|
||||
"use USR1 signal to activate.\n");
|
||||
|
||||
@ -29,6 +29,11 @@
|
||||
#include <pthread.h>
|
||||
#include "obj-types.h"
|
||||
|
||||
/* some settings for various debug modes */
|
||||
#define DEBUG_OFF 0
|
||||
#define DEBUG_ONDEMAND 1
|
||||
#define DEBUG_FULL 2
|
||||
|
||||
/* external static data elements (some time to be replaced) */
|
||||
extern int Debug; /* debug flag - read-only after startup */
|
||||
extern int debugging_on; /* read-only, except on sig USR1 */
|
||||
|
||||
@ -569,7 +569,7 @@ logmsgInternal(int iErr, int pri, uchar *msg, int flags)
|
||||
* permits us to process unmodified config files which otherwise contain a
|
||||
* supressor statement.
|
||||
*/
|
||||
if(((Debug || NoFork) && bErrMsgToStderr) || iConfigVerify) {
|
||||
if(((Debug == DEBUG_FULL || NoFork) && bErrMsgToStderr) || iConfigVerify) {
|
||||
if(LOG_PRI(pri) == LOG_ERR)
|
||||
fprintf(stderr, "rsyslogd: %s\n", msg);
|
||||
}
|
||||
@ -977,9 +977,10 @@ static void doDie(int sig)
|
||||
static int iRetries = 0; /* debug aid */
|
||||
dbgprintf(MSG1);
|
||||
if(Debug)
|
||||
if(Debug == DEBUG_FULL)
|
||||
write(1, MSG1, sizeof(MSG1) - 1);
|
||||
if(iRetries++ == 4) {
|
||||
if(Debug)
|
||||
if(Debug == DEBUG_FULL)
|
||||
write(1, MSG2, sizeof(MSG2) - 1);
|
||||
abort();
|
||||
}
|
||||
@ -2169,7 +2170,7 @@ static rsRetVal mainThread()
|
||||
* is still in its infancy (and not really done), we currently accept this issue.
|
||||
* rgerhards, 2009-06-29
|
||||
*/
|
||||
if(!(Debug || NoFork)) {
|
||||
if(!(Debug == DEBUG_FULL || NoFork)) {
|
||||
close(1);
|
||||
close(2);
|
||||
bErrMsgToStderr = 0;
|
||||
@ -2361,7 +2362,7 @@ doGlblProcessInit(void)
|
||||
|
||||
thrdInit();
|
||||
|
||||
if( !(Debug || NoFork) )
|
||||
if( !(Debug == DEBUG_FULL || NoFork) )
|
||||
{
|
||||
DBGPRINTF("Checking pidfile.\n");
|
||||
if (!check_pid(PidFile))
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user