00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020 #pragma once
00021
00022 #include <cstdarg>
00023
00024 #include <string>
00025
00026 #include <drizzled/error/priority_t.h>
00027
00028 namespace drizzle_plugin {
00029
00030 class WrapSyslog
00031 {
00032 private:
00033 bool _check;
00034
00035 WrapSyslog();
00036 public:
00037 ~WrapSyslog();
00038 static WrapSyslog& singleton();
00039
00040 static int getFacilityByName(const char *);
00041 static int getPriorityByName(const char *);
00042
00043 void openlog(const std::string &ident);
00044 void vlog(int facility, const drizzled::error::priority_t priority, const char *format, va_list ap);
00045 void log(int facility, const drizzled::error::priority_t priority, const char *format, ...);
00046 };
00047
00048 inline WrapSyslog& WrapSyslog::singleton()
00049 {
00050 static WrapSyslog handle;
00051 return handle;
00052 }
00053
00054 }
00055