Drizzled Public API Documentation

logging.h
00001 /* -*- mode: c++; c-basic-offset: 2; indent-tabs-mode: nil; -*-
00002  *  vim:expandtab:shiftwidth=2:tabstop=2:smarttab:
00003  *
00004  *  Definitions required for Query Logging plugin
00005  *
00006  *  Copyright (C) 2008 Sun Microsystems, Inc.
00007  *
00008  *  This program is free software; you can redistribute it and/or modify
00009  *  it under the terms of the GNU General Public License as published by
00010  *  the Free Software Foundation; version 2 of the License.
00011  *
00012  *  This program is distributed in the hope that it will be useful,
00013  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
00014  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00015  *  GNU General Public License for more details.
00016  *
00017  *  You should have received a copy of the GNU General Public License
00018  *  along with this program; if not, write to the Free Software
00019  *  Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00020  */
00021 
00022 #pragma once
00023 
00024 #include <drizzled/plugin/plugin.h>
00025 #include <drizzled/visibility.h>
00026 
00027 namespace drizzled {
00028 namespace plugin {
00029 
00030 class DRIZZLED_API Logging : public Plugin
00031 {
00032 public:
00033   explicit Logging(std::string name_arg)
00034     : Plugin(name_arg, "Logging")
00035   {}
00036 
00041   virtual bool pre(Session *) {return false;}
00042   virtual bool post(Session *) {return false;}
00043   virtual bool postEnd(Session*) {return false;}
00044   virtual bool resetGlobalScoreboard() {return false;}
00045 
00046   static bool addPlugin(Logging *handler);
00047   static void removePlugin(Logging *handler);
00048   static bool preDo(Session *session);
00049   static bool postDo(Session *session);
00050   static bool postEndDo(Session *session);
00051   static bool resetStats(Session *session);
00052 };
00053 
00054 } /* namespace plugin */
00055 } /* namespace drizzled */
00056