~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/syslog/wrap.h

  • Committer: Stewart Smith
  • Date: 2010-12-07 07:13:27 UTC
  • mfrom: (1977 staging)
  • mto: (2021.1.2 build)
  • mto: This revision was merged to the branch mainline in revision 1986.
  • Revision ID: stewart@flamingspork.com-20101207071327-1jg63kw3pc4np74d
merge trunk

Show diffs side-by-side

added added

removed removed

Lines of Context:
22
22
 
23
23
#include <stdarg.h>
24
24
 
 
25
#include <string>
 
26
 
 
27
namespace drizzle_plugin
 
28
{
 
29
 
25
30
class WrapSyslog
26
31
{
27
 
 private:
 
32
private:
 
33
  bool _check;
 
34
 
28
35
  WrapSyslog(const WrapSyslog&);
29
36
  WrapSyslog& operator=(const WrapSyslog&);
30
37
 
31
38
  WrapSyslog();
32
39
 
33
 
  bool openlog_check;
34
 
  char openlog_ident[32];
35
40
 
36
 
 public:
 
41
public:
37
42
  ~WrapSyslog();
38
43
  static WrapSyslog& singleton();
39
44
 
40
45
  static int getFacilityByName(const char *);
41
46
  static int getPriorityByName(const char *);
42
47
 
43
 
  void openlog(char *ident);
 
48
  void openlog(const std::string &ident);
44
49
  void vlog(int facility, int priority, const char *format, va_list ap);
45
50
  void log(int facility, int priority, const char *format, ...);
46
51
};
47
52
 
 
53
inline WrapSyslog& WrapSyslog::singleton()
 
54
{
 
55
  static WrapSyslog handle;
 
56
  return handle;
 
57
}
 
58
 
 
59
} /* namespsace drizzle_plugin */
 
60
 
48
61
#endif /* PLUGIN_SYSLOG_WRAP_H */