1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
* Definitions required for Query Logging plugin
6
* Copyright (C) 2008 Sun Microsystems, Inc.
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.
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.
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
22
#ifndef DRIZZLED_PLUGIN_LOGGING_H
23
#define DRIZZLED_PLUGIN_LOGGING_H
25
#include <drizzled/plugin/plugin.h>
29
#include <drizzled/visibility.h>
38
class DRIZZLED_API Logging : public Plugin
41
Logging(const Logging &);
42
Logging& operator=(const Logging &);
44
explicit Logging(std::string name_arg)
45
: Plugin(name_arg, "Logging")
50
* Make these no-op rather than pure-virtual so that it's easy for a plugin
51
* to only implement one.
53
virtual bool pre(Session *) {return false;}
54
virtual bool post(Session *) {return false;}
55
virtual bool postEnd(Session*) {return false;}
56
virtual bool resetGlobalScoreboard() {return false;}
58
static bool addPlugin(Logging *handler);
59
static void removePlugin(Logging *handler);
60
static bool preDo(Session *session);
61
static bool postDo(Session *session);
62
static bool postEndDo(Session *session);
63
static bool resetStats(Session *session);
66
} /* namespace plugin */
67
} /* namespace drizzled */
69
#endif /* DRIZZLED_PLUGIN_LOGGING_H */