00001 // 00002 // plumbing - C++ wrapper facades for Berkeley sockets 00003 // Copyright (C) 2009 Peter Miller 00004 // 00005 // This program is free software; you can redistribute it and/or modify it 00006 // under the terms of the GNU General Public License, version 3, as published 00007 // by the Free Software Foundation. 00008 // 00009 // This program is distributed in the hope that it will be useful, but WITHOUT 00010 // ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 00011 // FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for 00012 // more details. 00013 // 00014 // You should have received a copy of the GNU General Public License along 00015 // with this program. If not, see <http://www.gnu.org/licenses/>. 00016 // 00017 00018 #ifndef LIBPLUMBING_LOGGING_FILE_H 00019 #define LIBPLUMBING_LOGGING_FILE_H 00020 00021 #include <ctime> 00022 #include <string> 00023 00024 #include <libplumbing/logging.h> 00025 00026 namespace plumbing { 00027 00035 class logging_file: 00036 public logging 00037 { 00038 public: 00042 virtual ~logging_file(); 00043 00050 logging_file(const std::string &filename); 00051 00052 protected: 00053 // See base class fopr documentation. 00054 void deliver_message_text(const char *txt); 00055 00056 private: 00061 std::string filename; 00062 00071 void *vfp; 00072 00078 time_t since; 00079 00083 logging_file(); 00084 00088 logging_file(const logging_file &); 00089 00093 logging_file &operator=(const logging_file &); 00094 }; 00095 00096 } 00097 00098 #endif // LIBPLUMBING_LOGGING_FILE_H 00099 // vim: set ts=8 sw=4 et