mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-04-19 17:57:22 +00:00
console tweak
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@1156 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
f6dba5de97
commit
0ec4d10479
@ -73,6 +73,7 @@ static void add_mapping(char *var, char *val)
|
|||||||
name = switch_core_strdup(module_pool, var);
|
name = switch_core_strdup(module_pool, var);
|
||||||
switch_core_hash_insert(name_hash, name, name);
|
switch_core_hash_insert(name_hash, name, name);
|
||||||
}
|
}
|
||||||
|
|
||||||
del_mapping(name);
|
del_mapping(name);
|
||||||
switch_core_hash_insert(log_hash, name, (void *) &STATIC_LEVELS[(uint8_t)switch_log_str2level(val)]);
|
switch_core_hash_insert(log_hash, name, (void *) &STATIC_LEVELS[(uint8_t)switch_log_str2level(val)]);
|
||||||
}
|
}
|
||||||
@ -108,9 +109,7 @@ static switch_status switch_console_logger(const switch_log_node *node, switch_l
|
|||||||
uint8_t *lookup = NULL;
|
uint8_t *lookup = NULL;
|
||||||
switch_log_level level = SWITCH_LOG_DEBUG;
|
switch_log_level level = SWITCH_LOG_DEBUG;
|
||||||
|
|
||||||
if (all_level > -1) {
|
if (log_hash) {
|
||||||
level = (switch_log_level) all_level;
|
|
||||||
} else if (log_hash) {
|
|
||||||
lookup = switch_core_hash_find(log_hash, node->file);
|
lookup = switch_core_hash_find(log_hash, node->file);
|
||||||
|
|
||||||
if (!lookup) {
|
if (!lookup) {
|
||||||
@ -120,6 +119,8 @@ static switch_status switch_console_logger(const switch_log_node *node, switch_l
|
|||||||
|
|
||||||
if (lookup) {
|
if (lookup) {
|
||||||
level = (switch_log_level) *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)) {
|
if (!log_hash || (((all_level > - 1) || lookup) && level >= node->level)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user