1
/* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
-*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
2
3
* vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
4
5
* Definitions required for Query Logging plugin
6
* Copyright (C) 2008 Sun Microsystems
7
* Copyright (C) 2008 Mark Atwood
8
9
* This program is free software; you can redistribute it and/or modify
9
10
* it under the terms of the GNU General Public License as published by
22
23
#ifndef DRIZZLED_PLUGIN_LOGGING_H
23
24
#define DRIZZLED_PLUGIN_LOGGING_H
25
#include "drizzled/plugin/plugin.h"
36
class Logging : public Plugin
39
Logging(const Logging &);
40
Logging& operator=(const Logging &);
42
explicit Logging(std::string name_arg)
43
: Plugin(name_arg, "Logging")
48
* Make these no-op rather than pure-virtual so that it's easy for a plugin
49
* to only implement one.
51
virtual bool pre(Session *) {return false;}
52
virtual bool post(Session *) {return false;}
53
virtual bool postEnd(Session*) {return false;}
54
virtual bool resetGlobalScoreboard() {return false;}
56
static bool addPlugin(Logging *handler);
57
static void removePlugin(Logging *handler);
58
static bool preDo(Session *session);
59
static bool postDo(Session *session);
60
static bool postEndDo(Session *session);
61
static bool resetStats(Session *session);
64
} /* namespace plugin */
65
} /* namespace drizzled */
26
typedef struct logging_st
28
bool (*logging_pre)(Session *session);
29
bool (*logging_post)(Session *session);
67
32
#endif /* DRIZZLED_PLUGIN_LOGGING_H */