~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/syslog/logging.h

Merge Stewart's dead code removal

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
 
 *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3
 
 *
4
 
 *  Copyright (C) 2009 Sun Microsystems, Inc.
5
 
 *  Copyright (C) 2010 Mark Atwood
6
 
 *
7
 
 *  This program is free software; you can redistribute it and/or modify
8
 
 *  it under the terms of the GNU General Public License as published by
9
 
 *  the Free Software Foundation; version 2 of the License.
10
 
 *
11
 
 *  This program is distributed in the hope that it will be useful,
12
 
 *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
 *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 
 *  GNU General Public License for more details.
15
 
 *
16
 
 *  You should have received a copy of the GNU General Public License
17
 
 *  along with this program; if not, write to the Free Software
18
 
 *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
19
 
 */
20
 
 
21
 
#ifndef PLUGIN_SYSLOG_LOGGING_H
22
 
#define PLUGIN_SYSLOG_LOGGING_H
23
 
 
24
 
#include <drizzled/plugin/logging.h>
25
 
 
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);
50
 
 
51
 
  virtual bool post (drizzled::Session *session);
52
 
};
53
 
 
54
 
} /* namespace logging */
55
 
} /* namespace drizzle_plugin */
56
 
 
57
 
#endif /* PLUGIN_SYSLOG_LOGGING_H */