const, baby
[asdcplib.git] / src / KM_log.h
index fdcfd13d10c7a33e17171658f486f640dd8a7641..09897060386752eb98e12e6190ff77be5f230f06 100755 (executable)
@@ -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