git.fiddlerwoaroof.com
sys_syslog.cc
bc6c3d35
 /* Copyright (C) CJ Affiliate
  *
  * You may use, distribute and modify this code under  the
  * terms of the  GNU General Public License  version 2  or
  * later.
  *
  * You should have received a copy of the license with this
  * file. If not, you will find a copy in the "LICENSE" file
  * at https://github.com/cjdev/dual-control.
  */
 
a9690b1d
 #include <syslog.h>
 
 #include "sys_syslog.h"
 
bc6c3d35
 namespace
 {
 class impl : public sys_syslog_ifc
 {
 public:
55d92c45
     void openlog (const char *ident, int logopt, int facility) override
bc6c3d35
     {
         ::openlog (ident, logopt, facility);
     }
a9690b1d
 
55d92c45
     void vsyslog (int priority, const char *message, va_list args) override
bc6c3d35
     {
         ::vsyslog (priority, message, args);
     }
a9690b1d
 
55d92c45
     void closelog() override
bc6c3d35
     {
         ::closelog();
     }
a9690b1d
 };
 }
 
bc6c3d35
 sys_syslog sys_syslog::create()
 {
     static sys_syslog singleton (sys_syslog::delegate (new impl));
a9690b1d
     return singleton;
 }