summaryrefslogtreecommitdiffstats
path: root/debug.c
diff options
context:
space:
mode:
authorRainer Gerhards <rgerhards@adiscon.com>2008-02-12 12:55:52 +0000
committerRainer Gerhards <rgerhards@adiscon.com>2008-02-12 12:55:52 +0000
commit32057ac4f9c31cd01e6501b08a60a46a319d8a2c (patch)
tree25a952fd06e0cfb90a2969512e5cf56e5ba752b1 /debug.c
parentfaa334e489a3922df0889ea4144ed311c690d9e7 (diff)
downloadrsyslog-32057ac4f9c31cd01e6501b08a60a46a319d8a2c.tar.gz
rsyslog-32057ac4f9c31cd01e6501b08a60a46a319d8a2c.tar.xz
rsyslog-32057ac4f9c31cd01e6501b08a60a46a319d8a2c.zip
reduced volume of debug output
Diffstat (limited to 'debug.c')
-rw-r--r--debug.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/debug.c b/debug.c
index 4da36cc6..b46c17b0 100644
--- a/debug.c
+++ b/debug.c
@@ -518,7 +518,10 @@ int dbgCondWait(pthread_cond_t *cond, pthread_mutex_t *pmut, dbgFuncDB_t *pFuncD
int ret;
dbgRecordExecLocation(iStackPtr, ln);
dbgMutexUnlockLog(pmut, pFuncDB, ln);
- dbgprintf("%s:%d:%s: mutex %p waiting on condition %p\n", pFuncDB->file, pFuncDB->line, pFuncDB->func, (void*)pmut, (void*)cond);
+ if(bPrintMutexAction) {
+ dbgprintf("%s:%d:%s: mutex %p waiting on condition %p\n", pFuncDB->file, pFuncDB->line,
+ pFuncDB->func, (void*)pmut, (void*)cond);
+ }
dbgMutexPreLockLog(pmut, pFuncDB, ln);
ret = pthread_cond_wait(cond, pmut);
return ret;
@@ -532,8 +535,10 @@ int dbgCondTimedWait(pthread_cond_t *cond, pthread_mutex_t *pmut, const struct t
dbgRecordExecLocation(iStackPtr, ln);
dbgMutexUnlockLog(pmut, pFuncDB, ln);
dbgMutexPreLockLog(pmut, pFuncDB, ln);
- dbgprintf("%s:%d:%s: mutex %p waiting on condition %p (with timeout)\n", pFuncDB->file, pFuncDB->line, pFuncDB->func,
- (void*)pmut, (void*)cond);
+ if(bPrintMutexAction) {
+ dbgprintf("%s:%d:%s: mutex %p waiting on condition %p (with timeout)\n", pFuncDB->file,
+ pFuncDB->line, pFuncDB->func, (void*)pmut, (void*)cond);
+ }
ret = pthread_cond_timedwait(cond, pmut, abstime);
dbgMutexLockLog(pmut, pFuncDB, ln);
return ret;