[Freeswitch-svn] [commit] r1156 - freeswitch/trunk/src/mod/loggers/mod_console

brian at freeswitch.org brian at freeswitch.org
Wed Jun 7 14:22:34 EDT 2006


Author: brian
Date: Fri Apr 14 11:59:22 2006
New Revision: 1156

Modified:
   freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c

Log:
console tweak

Modified: freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c
==============================================================================
--- freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c	(original)
+++ freeswitch/trunk/src/mod/loggers/mod_console/mod_console.c	Fri Apr 14 11:59:22 2006
@@ -73,6 +73,7 @@
 		name = switch_core_strdup(module_pool, var);
 		switch_core_hash_insert(name_hash, name, name);
 	}
+
 	del_mapping(name);
 	switch_core_hash_insert(log_hash, name, (void *) &STATIC_LEVELS[(uint8_t)switch_log_str2level(val)]);
 }
@@ -108,9 +109,7 @@
 		uint8_t *lookup = NULL;
 		switch_log_level level = SWITCH_LOG_DEBUG;
 		
-		if (all_level > -1) {
-			level = (switch_log_level) all_level;
-		} else if (log_hash) {
+		if (log_hash) {
 			lookup = switch_core_hash_find(log_hash, node->file);
 			
 			if (!lookup) {
@@ -120,8 +119,10 @@
 
 		if (lookup) {
 			level = (switch_log_level) *lookup;
-		}
-		
+		} else if (all_level > -1) {
+			level = (switch_log_level) all_level;
+		} 
+
 		if (!log_hash || (((all_level > - 1) || lookup) && level >= node->level)) {
 			fprintf(handle, node->data);
 		}



More information about the Freeswitch-svn mailing list