00001 /* - mode: c; c-basic-offset: 2; indent-tabs-mode: nil; -*- 00002 * vim:expandtab:shiftwidth=2:tabstop=2:smarttab: 00003 * 00004 * Copyright 2011 Daniel Nichter 00005 * 00006 * This program is free software: you can redistribute it and/or modify 00007 * it under the terms of the GNU General Public License as published by 00008 * the Free Software Foundation, either version 3 of the License, or 00009 * (at your option) any later version. 00010 * 00011 * This program is distributed in the hope that it will be useful, 00012 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00013 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00014 * GNU General Public License for more details. 00015 * 00016 * You should have received a copy of the GNU General Public License 00017 * along with this program. If not, see <http://www.gnu.org/licenses/>. 00018 */ 00019 00020 #include <iostream> 00021 #include <fstream> 00022 #include "event.h" 00023 00034 class QueryLoggerFile 00035 { 00036 public: 00037 QueryLoggerFile(); 00038 ~QueryLoggerFile(); 00039 00054 bool logEvent(const event_t *event); 00055 00072 bool openLogFile(const char *file); 00073 00085 bool closeLogFile(); 00086 00087 private: 00088 std::ofstream _fh; 00089 };