~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/syslog/logging.h

Merge Joe, plus I updated the tests.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
2
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
3
 *
4
 
 *  Copyright (C) 2009 Sun Microsystems, Inc.
 
4
 *  Copyright (C) 2009 Sun Microsystems
5
5
 *  Copyright (C) 2010 Mark Atwood
6
6
 *
7
7
 *  This program is free software; you can redistribute it and/or modify
21
21
#ifndef PLUGIN_SYSLOG_LOGGING_H
22
22
#define PLUGIN_SYSLOG_LOGGING_H
23
23
 
 
24
#include "module.h"
24
25
#include <drizzled/plugin/logging.h>
25
26
 
26
 
namespace drizzle_plugin
27
 
{
28
 
namespace logging
29
 
{
30
 
 
31
 
class Syslog: public drizzled::plugin::Logging
32
 
{
33
 
private:
34
 
  int _facility;
35
 
  int _priority;
36
 
  uint64_t _threshold_slow;
37
 
  uint64_t _threshold_big_resultset;
38
 
  uint64_t _threshold_big_examined;
39
 
 
40
 
  Syslog();
41
 
  Syslog(const Syslog&);
42
 
  Syslog& operator=(const Syslog&);
43
 
 
44
 
public:
45
 
  Syslog(const std::string &facility,
46
 
         const std::string &priority,
47
 
         uint64_t threshold_slow,
48
 
         uint64_t threshold_big_resultset,
49
 
         uint64_t threshold_big_examined);
 
27
class Logging_syslog: public drizzled::plugin::Logging
 
28
{
 
29
 private:
 
30
  int syslog_facility;
 
31
  int syslog_priority;
 
32
 
 
33
  Logging_syslog(const Logging_syslog&);
 
34
  Logging_syslog& operator=(const Logging_syslog&);
 
35
 
 
36
 public:
 
37
  Logging_syslog();
50
38
 
51
39
  virtual bool post (drizzled::Session *session);
52
40
};
53
41
 
54
 
} /* namespace logging */
55
 
} /* namespace drizzle_plugin */
56
 
 
57
42
#endif /* PLUGIN_SYSLOG_LOGGING_H */