Drizzled Public API Documentation

logging.h
1 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2  * vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
3  *
4  * Definitions required for Query Logging plugin
5  *
6  * Copyright (C) 2008 Sun Microsystems, Inc.
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  */
21 
22 #pragma once
23 
24 #include <drizzled/plugin/plugin.h>
25 #include <drizzled/visibility.h>
26 
27 namespace drizzled {
28 namespace plugin {
29 
30 class DRIZZLED_API Logging : public Plugin
31 {
32 public:
33  explicit Logging(std::string name_arg)
34  : Plugin(name_arg, "Logging")
35  {}
36 
41  virtual bool pre(Session *) {return false;}
42  virtual bool post(Session *) {return false;}
43  virtual bool postEnd(Session*) {return false;}
44  virtual bool resetGlobalScoreboard() {return false;}
45 
46  static bool addPlugin(Logging *handler);
47  static void removePlugin(Logging *handler);
48  static bool preDo(Session *session);
49  static bool postDo(Session *session);
50  static bool postEndDo(Session *session);
51  static bool resetStats(Session *session);
52 };
53 
54 } /* namespace plugin */
55 } /* namespace drizzled */
56 
#define DRIZZLED_API
Definition: visibility.h:62
Visibility Control Macros.
virtual bool pre(Session *)
Definition: logging.h:41