2
Definitions required for Logging plugin
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
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
5
22
#ifndef DRIZZLED_PLUGIN_LOGGING_H
6
23
#define DRIZZLED_PLUGIN_LOGGING_H
8
typedef struct logging_st
10
bool (*logging_pre)(THD *thd);
11
bool (*logging_post)(THD *thd);
36
Logging(std::string name_arg): name(name_arg) {}
39
std::string getName() { return name; }
41
* Make these no-op rather than pure-virtual so that it's easy for a plugin
42
* to only implement one.
44
virtual bool pre(Session *) {return false;}
45
virtual bool post(Session *) {return false;}
47
static void add(Logging *handler);
48
static void remove(Logging *handler);
49
static bool pre_do(Session *session);
50
static bool post_do(Session *session);
53
} /* namespace plugin */
54
} /* namespace drizzled */
14
56
#endif /* DRIZZLED_PLUGIN_LOGGING_H */