diff options
| author | jhurst <jhurst@cinecert.com> | 2009-06-22 05:49:02 +0000 |
|---|---|---|
| committer | jhurst <> | 2009-06-22 05:49:02 +0000 |
| commit | a84ec32cfc61397feeb577637744031cc64d862d (patch) | |
| tree | a64185ae139d51e1b76fab7e2e9c00f5ef25628d /src/KM_log.cpp | |
| parent | e34beed6313ea4add7539608ecb92082728778f1 (diff) | |
new log and fileio features
XMLElement parse bugfix (was ignoring well-formedness errors)
Diffstat (limited to 'src/KM_log.cpp')
| -rwxr-xr-x | src/KM_log.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/src/KM_log.cpp b/src/KM_log.cpp index 23f17d8..985d210 100755 --- a/src/KM_log.cpp +++ b/src/KM_log.cpp @@ -182,11 +182,11 @@ Kumu::SyslogLogSink::~SyslogLogSink() // void -Kumu::SyslogLogSink::WriteEntry(const LogEntry& e) +Kumu::SyslogLogSink::WriteEntry(const LogEntry& Entry) { int priority; - switch ( e.Type ) + switch ( Entry.Type ) { case Kumu::LOG_ALERT: priority = SYSLOG_ALERT; break; case Kumu::LOG_CRIT: priority = SYSLOG_CRIT; break; @@ -197,7 +197,12 @@ Kumu::SyslogLogSink::WriteEntry(const LogEntry& e) case Kumu::LOG_DEBUG: priority = SYSLOG_DEBUG; break; } - syslog(priority, "%s", e.Msg.substr(0, e.Msg.size() - 1).c_str()); + AutoMutex L(m_Lock); + + if ( Entry.TestFilter(m_filter) ) + { + syslog(priority, "%s", Entry.Msg.substr(0, Entry.Msg.size() - 1).c_str()); + } } // |
