mirror of
https://github.com/signalwire/freeswitch.git
synced 2025-08-13 17:38:59 +00:00
put math patch back
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@16423 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
@@ -339,6 +339,14 @@ SWITCH_DECLARE(void) switch_log_vprintf(switch_text_channel_t channel, const cha
|
||||
#else
|
||||
const char *extra_fmt = "%s [%s] %s:%d%c%s";
|
||||
#endif
|
||||
switch_log_level_t limit_level = runtime.hard_log_level;
|
||||
|
||||
if (channel == SWITCH_CHANNEL_ID_SESSION && userdata) {
|
||||
switch_core_session_t *session = (switch_core_session_t*)userdata;
|
||||
if (limit_level < session->loglevel) {
|
||||
limit_level = session->loglevel;
|
||||
}
|
||||
}
|
||||
|
||||
if (level > 100) {
|
||||
if ((uint32_t)(level - 100) > runtime.debug_level) {
|
||||
@@ -348,7 +356,7 @@ SWITCH_DECLARE(void) switch_log_vprintf(switch_text_channel_t channel, const cha
|
||||
level = 7;
|
||||
}
|
||||
|
||||
if (level > runtime.hard_log_level) {
|
||||
if (level > limit_level) {
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -466,7 +474,11 @@ SWITCH_DECLARE(void) switch_log_vprintf(switch_text_channel_t channel, const cha
|
||||
node->content = content;
|
||||
node->timestamp = now;
|
||||
node->channel = channel;
|
||||
node->userdata = !zstr(userdata) ? strdup(userdata) : NULL;
|
||||
if (channel == SWITCH_CHANNEL_ID_SESSION) {
|
||||
node->userdata = userdata ? strdup(switch_core_session_get_uuid((switch_core_session_t*)userdata)) : NULL;
|
||||
} else {
|
||||
node->userdata = !zstr(userdata) ? strdup(userdata) : NULL;
|
||||
}
|
||||
|
||||
if (switch_queue_trypush(LOG_QUEUE, node) != SWITCH_STATUS_SUCCESS) {
|
||||
switch_log_node_free(&node);
|
||||
|
Reference in New Issue
Block a user