From 774d21a0b430a2e213dd938f4b578c4883e052df Mon Sep 17 00:00:00 2001 From: Michael Jerris Date: Sat, 26 Jul 2008 05:06:24 +0000 Subject: [PATCH] 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 --- src/mod/loggers/mod_syslog/mod_syslog.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/mod/loggers/mod_syslog/mod_syslog.c b/src/mod/loggers/mod_syslog/mod_syslog.c index b4acd1ecb9..8ea4103a23 100644 --- a/src/mod/loggers/mod_syslog/mod_syslog.c +++ b/src/mod/loggers/mod_syslog/mod_syslog.c @@ -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; }