diff options
author | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-13 08:14:47 +0000 |
---|---|---|
committer | Rainer Gerhards <rgerhards@adiscon.com> | 2008-02-13 08:14:47 +0000 |
commit | 722e691af737862b32515fd5644feb33547eff8f (patch) | |
tree | c6730a14de9a90d9012aac2243e5c87ae743f9b1 /debug.c | |
parent | 088ad960e9d77d6a58a3914e53275a5e40b85dc3 (diff) | |
download | rsyslog-722e691af737862b32515fd5644feb33547eff8f.tar.gz rsyslog-722e691af737862b32515fd5644feb33547eff8f.tar.xz rsyslog-722e691af737862b32515fd5644feb33547eff8f.zip |
- introduced a new, more powerful, message submission interface submitMsg()
in additon to logmsg()
- a first, rough implementation of imfile that is able to read files (but
does not persist or handle rotation or whatever)
Diffstat (limited to 'debug.c')
-rw-r--r-- | debug.c | 6 |
1 files changed, 4 insertions, 2 deletions
@@ -58,6 +58,7 @@ static dbgThrdInfo_t *dbgGetThrdInfo(void); int Debug; /* debug flag - read-only after startup */ int debugging_on = 0; /* read-only, except on sig USR1 */ static int bLogFuncFlow = 0; /* shall the function entry and exit be logged to the debug log? */ +static int bLogAllocFree = 0; /* shall calls to (m/c)alloc and free be logged to the debug log? */ static int bPrintFuncDBOnExit = 0; /* shall the function entry and exit be logged to the debug log? */ static int bPrintMutexAction = 0; /* shall mutex calls be printed to the debug log? */ static int bPrintTime = 1; /* print a timestamp together with debug message */ @@ -554,8 +555,9 @@ int dbgCondTimedWait(pthread_cond_t *cond, pthread_mutex_t *pmut, const struct t void dbgFree(void *pMem, dbgFuncDB_t *pFuncDB, int ln, int iStackPtr) { dbgRecordExecLocation(iStackPtr, ln); - dbgprintf("%s:%d:%s: free %p\n", pFuncDB->file, - ln, pFuncDB->func, (void*) pMem); + if(bLogAllocFree) { + dbgprintf("%s:%d:%s: free %p\n", pFuncDB->file, ln, pFuncDB->func, (void*) pMem); + } free(pMem); } |