mod_syslog don't log blank lines (FSCORE-163)

git-svn-id: http://svn.freeswitch.org/svn/freeswitch/trunk@9179 d0543943-73ff-0310-b7d9-9358b9ac24b2
This commit is contained in:
Michael Jerris 2008-07-26 05:06:24 +00:00
parent 2243d12104
commit 774d21a0b4
1 changed files with 2 additions and 3 deletions

View File

@ -98,12 +98,11 @@ static switch_status_t mod_syslog_logger(const switch_log_node_t *node, switch_l
break;
}
if (!switch_strlen_zero(node->data)) {
/* don't log blank lines */
if(!switch_strlen_zero(node->data) && (strspn(node->data, " \t\r\n") < strlen(node->data))) {
syslog(syslog_level, "%s", node->data);
}
return SWITCH_STATUS_SUCCESS;
}