From 1f3dedbf2d3ab1406529dd28ad57a6d0c5f1aa5f Mon Sep 17 00:00:00 2001 From: Anthony Minessale Date: Tue, 18 Apr 2006 00:45:16 +0000 Subject: [PATCH] update git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1182 d0543943-73ff-0310-b7d9-9358b9ac24b2 --- src/switch_log.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/switch_log.c b/src/switch_log.c index d763c6cbe6..d7f123bdd4 100644 --- a/src/switch_log.c +++ b/src/switch_log.c @@ -132,7 +132,7 @@ static void *SWITCH_THREAD_FUNC log_thread(switch_thread *thread, void *obj) } node = (switch_log_node *) pop; - + switch_mutex_lock(BINDLOCK); for(binding = BINDINGS; binding; binding = binding->next) { if (binding->level >= node->level) { @@ -224,7 +224,8 @@ SWITCH_DECLARE(void) switch_log_printf(switch_text_channel channel, char *file, if (level == SWITCH_LOG_CONSOLE || !THREAD_RUNNING) { fprintf(handle, data); } - if (level >= MAX_LEVEL) { + + if (level <= MAX_LEVEL) { switch_log_node *node = malloc(sizeof(*node)); node->data = data; node->file = strdup(filep);