1130.1.1
by Monty Taylor
Merged in plugin-slot-reorg patches. |
1 |
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
|
499.2.10
by Mark Atwood
add editor format hints, and other useful metadata comments |
2 |
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
|
1130.1.1
by Monty Taylor
Merged in plugin-slot-reorg patches. |
3 |
*
|
660.1.3
by Eric Herman
removed trailing whitespace with simple script: |
4 |
* Definitions required for Query Logging plugin
|
1130.1.1
by Monty Taylor
Merged in plugin-slot-reorg patches. |
5 |
*
|
1010
by Brian Aker
Replacing Sun employee copyright headers (aka... anything done by a Sun |
6 |
* Copyright (C) 2008 Sun Microsystems
|
499.2.10
by Mark Atwood
add editor format hints, and other useful metadata comments |
7 |
*
|
8 |
* This program is free software; you can redistribute it and/or modify
|
|
9 |
* it under the terms of the GNU General Public License as published by
|
|
10 |
* the Free Software Foundation; version 2 of the License.
|
|
11 |
*
|
|
12 |
* This program is distributed in the hope that it will be useful,
|
|
13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
15 |
* GNU General Public License for more details.
|
|
16 |
*
|
|
17 |
* You should have received a copy of the GNU General Public License
|
|
18 |
* along with this program; if not, write to the Free Software
|
|
19 |
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
|
|
20 |
*/
|
|
383.6.1
by Mark Atwood
add pluggable logging |
21 |
|
22 |
#ifndef DRIZZLED_PLUGIN_LOGGING_H
|
|
23 |
#define DRIZZLED_PLUGIN_LOGGING_H
|
|
24 |
||
1237.9.3
by Padraig O'Sullivan
Removed one the includes I put in server_includes.h for the last commit to get rid of the inclusion |
25 |
#include "drizzled/plugin/plugin.h" |
26 |
||
968.2.33
by Monty Taylor
Removed plugin_foreach from logging_handler. |
27 |
#include <string> |
28 |
||
1280.1.10
by Monty Taylor
Put everything in drizzled into drizzled namespace. |
29 |
namespace drizzled |
30 |
{
|
|
1241.9.26
by Monty Taylor
Removed forward declares from server_includes.h |
31 |
class Session; |
32 |
||
1130.1.1
by Monty Taylor
Merged in plugin-slot-reorg patches. |
33 |
namespace plugin |
34 |
{
|
|
35 |
||
1130.2.5
by Monty Taylor
Some carnage. I'm sure it'll need fixed. |
36 |
class Logging : public Plugin |
383.6.1
by Mark Atwood
add pluggable logging |
37 |
{
|
1130.2.5
by Monty Taylor
Some carnage. I'm sure it'll need fixed. |
38 |
Logging(); |
39 |
Logging(const Logging &); |
|
1130.2.16
by Monty Taylor
Cleaned up the constructor initializer lists per Brian. |
40 |
Logging& operator=(const Logging &); |
958.1.1
by Monty Taylor
Made logging plugin class based. |
41 |
public: |
1130.2.16
by Monty Taylor
Cleaned up the constructor initializer lists per Brian. |
42 |
explicit Logging(std::string name_arg) |
1192.2.5
by Monty Taylor
Replaced overridable virtual methods with passing name to constructor. Now individual plugins will not be allowed to set their own plugin type name. :) |
43 |
: Plugin(name_arg, "Logging") |
1130.2.16
by Monty Taylor
Cleaned up the constructor initializer lists per Brian. |
44 |
{}
|
1130.1.1
by Monty Taylor
Merged in plugin-slot-reorg patches. |
45 |
virtual ~Logging() {} |
958.1.1
by Monty Taylor
Made logging plugin class based. |
46 |
|
47 |
/**
|
|
48 |
* Make these no-op rather than pure-virtual so that it's easy for a plugin
|
|
1130.1.1
by Monty Taylor
Merged in plugin-slot-reorg patches. |
49 |
* to only implement one.
|
958.1.1
by Monty Taylor
Made logging plugin class based. |
50 |
*/
|
968.2.23
by Monty Taylor
Fixed lack-of-NULL. |
51 |
virtual bool pre(Session *) {return false;} |
52 |
virtual bool post(Session *) {return false;} |
|
1316.1.1
by Joe Daly
add plugin handle to logging to indicate when the session destructor is called |
53 |
virtual bool postEnd(Session*) {return false;} |
1130.1.12
by Monty Taylor
Moved service stuff into plugin/ |
54 |
|
1130.1.19
by Monty Taylor
Added error reporting to plugin registration. |
55 |
static bool addPlugin(Logging *handler); |
1130.1.18
by Monty Taylor
Changed ::add() and ::remove() to ::addPlugin() and ::removePlugin() so that |
56 |
static void removePlugin(Logging *handler); |
1130.1.16
by Monty Taylor
Fixed naming issue. |
57 |
static bool preDo(Session *session); |
58 |
static bool postDo(Session *session); |
|
1316.1.1
by Joe Daly
add plugin handle to logging to indicate when the session destructor is called |
59 |
static bool postEndDo(Session *session); |
958.1.1
by Monty Taylor
Made logging plugin class based. |
60 |
};
|
383.6.1
by Mark Atwood
add pluggable logging |
61 |
|
1130.1.1
by Monty Taylor
Merged in plugin-slot-reorg patches. |
62 |
} /* namespace plugin */ |
63 |
} /* namespace drizzled */ |
|
64 |
||
383.6.1
by Mark Atwood
add pluggable logging |
65 |
#endif /* DRIZZLED_PLUGIN_LOGGING_H */ |