X-Git-Url: https://git.carlh.net/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2FKM_log.h;h=09897060386752eb98e12e6190ff77be5f230f06;hb=08da7aadab3eb7fd03eae5a9a8038ecf8d05808a;hp=671c072af58fabc4fe172ee6bcdfb90104e503aa;hpb=4e35856e1045d356d3fcad1b4db4e40e613847c6;p=asdcplib.git diff --git a/src/KM_log.h b/src/KM_log.h index 671c072..0989706 100755 --- a/src/KM_log.h +++ b/src/KM_log.h @@ -1,5 +1,5 @@ /* -Copyright (c) 2004-2007, John Hurst +Copyright (c) 2004-2009, John Hurst All rights reserved. Redistribution and use in source and binary forms, with or without @@ -292,6 +292,23 @@ namespace Kumu void WriteEntry(const LogEntry&); }; + + // write messages to the syslog facility + class SyslogLogSink : public ILogSink + { + Mutex m_Lock; + KM_NO_COPY_CONSTRUCT(SyslogLogSink); + SyslogLogSink(); + + public: + SyslogLogSink(const std::string& source_name, int facility); + virtual ~SyslogLogSink(); + void WriteEntry(const LogEntry&); + }; + + // convert a string into the appropriate syslog facility id + int SyslogNameToFacility(const std::string& facility_name); + #endif