383.6.1
by Mark Atwood
add pluggable logging |
1 |
/*
|
499.2.10
by Mark Atwood
add editor format hints, and other useful metadata comments |
2 |
-*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
3 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
|
4 |
||
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
5 |
* Definitions required for Query Logging plugin
|
499.2.10
by Mark Atwood
add editor format hints, and other useful metadata comments |
6 |
|
1010
by Brian Aker
Replacing Sun employee copyright headers (aka... anything done by a Sun |
7 |
* Copyright (C) 2008 Sun Microsystems
|
499.2.10
by Mark Atwood
add editor format hints, and other useful metadata comments |
8 |
*
|
9 |
* This program is free software; you can redistribute it and/or modify
|
|
10 |
* it under the terms of the GNU General Public License as published by
|
|
11 |
* the Free Software Foundation; version 2 of the License.
|
|
12 |
*
|
|
13 |
* This program is distributed in the hope that it will be useful,
|
|
14 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
16 |
* GNU General Public License for more details.
|
|
17 |
*
|
|
18 |
* You should have received a copy of the GNU General Public License
|
|
19 |
* along with this program; if not, write to the Free Software
|
|
20 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
21 |
*/
|
|
383.6.1
by Mark Atwood
add pluggable logging |
22 |
|
23 |
#ifndef DRIZZLED_PLUGIN_LOGGING_H
|
|
24 |
#define DRIZZLED_PLUGIN_LOGGING_H
|
|
25 |
||
968.2.33
by Monty Taylor
Removed plugin_foreach from logging_handler. |
26 |
#include <string> |
27 |
||
958.1.1
by Monty Taylor
Made logging plugin class based. |
28 |
class Logging_handler |
383.6.1
by Mark Atwood
add pluggable logging |
29 |
{
|
968.2.33
by Monty Taylor
Removed plugin_foreach from logging_handler. |
30 |
std::string name; |
958.1.1
by Monty Taylor
Made logging plugin class based. |
31 |
public: |
968.2.33
by Monty Taylor
Removed plugin_foreach from logging_handler. |
32 |
Logging_handler(std::string name_arg): name(name_arg) {} |
33 |
Logging_handler(const char *name_arg): name(name_arg) {} |
|
958.1.1
by Monty Taylor
Made logging plugin class based. |
34 |
virtual ~Logging_handler() {} |
35 |
||
968.2.33
by Monty Taylor
Removed plugin_foreach from logging_handler. |
36 |
std::string getName() { return name; } |
958.1.1
by Monty Taylor
Made logging plugin class based. |
37 |
/**
|
38 |
* Make these no-op rather than pure-virtual so that it's easy for a plugin
|
|
39 |
* to only
|
|
40 |
*/
|
|
968.2.23
by Monty Taylor
Fixed lack-of-NULL. |
41 |
virtual bool pre(Session *) {return false;} |
42 |
virtual bool post(Session *) {return false;} |
|
958.1.1
by Monty Taylor
Made logging plugin class based. |
43 |
};
|
383.6.1
by Mark Atwood
add pluggable logging |
44 |
|
45 |
#endif /* DRIZZLED_PLUGIN_LOGGING_H */ |