summaryrefslogtreecommitdiff
path: root/logger.c
diff options
context:
space:
mode:
authorMark Spencer <markster@digium.com>2005-03-05 04:04:55 +0000
committerMark Spencer <markster@digium.com>2005-03-05 04:04:55 +0000
commitc6cb8f9239a531e0a59b9b4c35a7713b858ba13f (patch)
tree5dcb6e4520bff8802ca3feb3834cd1b68642306b /logger.c
parentbadc4dec4681a14695ef64d067a012d4aaa215fa (diff)
Allow debug to be enabled on a per-file basis...
git-svn-id: https://origsvn.digium.com/svn/asterisk/trunk@5143 65c4cc65-6c06-0410-ace0-fbb531ad65f3
Diffstat (limited to 'logger.c')
-rwxr-xr-xlogger.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/logger.c b/logger.c
index d9e5dfd32..502a9719f 100755
--- a/logger.c
+++ b/logger.c
@@ -564,6 +564,10 @@ void ast_log(int level, const char *file, int line, const char *function, const
/* Ignore anything that never gets logged anywhere */
if (!(global_logmask & (1 << level)))
return;
+
+ /* Ignore anything other than the currently debugged file if there is one */
+ if ((level == __LOG_DEBUG) && !ast_strlen_zero(debug_filename) && strcasecmp(debug_filename, file))
+ return;
/* begin critical section */
ast_mutex_lock(&loglock);