don't log lost logs of 0
git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@7656 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
parent
32e267ee53
commit
69a27f15b0
|
@ -109,6 +109,7 @@ static switch_status_t socket_logger(const switch_log_node_t *node, switch_log_l
|
|||
char *data = strdup(node->data);
|
||||
if (data) {
|
||||
if (switch_queue_trypush(l->log_queue, data) == SWITCH_STATUS_SUCCESS) {
|
||||
if (l->lost_logs) {
|
||||
int ll = l->lost_logs;
|
||||
switch_event_t *event;
|
||||
l->lost_logs = 0;
|
||||
|
@ -117,6 +118,7 @@ static switch_status_t socket_logger(const switch_log_node_t *node, switch_log_l
|
|||
switch_event_add_header(event, SWITCH_STACK_BOTTOM, "info", "lost %d log lines", ll);
|
||||
switch_event_fire(&event);
|
||||
}
|
||||
}
|
||||
} else {
|
||||
switch_safe_free(data);
|
||||
l->lost_logs++;
|
||||
|
|
Loading…
Reference in New Issue