Back to index

nux  3.0.0
RollingFileAppender.h
Go to the documentation of this file.
00001 // -*- Mode: C++; indent-tabs-mode: nil; tab-width: 2 -*-
00002 /*
00003  * Copyright 2011 Inalogic® Inc.
00004  *
00005  * This program is free software: you can redistribute it and/or modify it
00006  * under the terms of the GNU Lesser General Public License, as
00007  * published by the  Free Software Foundation; either version 2.1 or 3.0
00008  * of the License.
00009  *
00010  * This program is distributed in the hope that it will be useful, but
00011  * WITHOUT ANY WARRANTY; without even the implied warranties of
00012  * MERCHANTABILITY, SATISFACTORY QUALITY or FITNESS FOR A PARTICULAR
00013  * PURPOSE.  See the applicable version of the GNU Lesser General Public
00014  * License for more details.
00015  *
00016  * You should have received a copy of both the GNU Lesser General Public
00017  * License along with this program. If not, see <http://www.gnu.org/licenses/>
00018  *
00019  * Authored by: Tim Penhey <tim.penhey@canonical.com>
00020  *
00021  */
00022 #ifndef NUX_CORE_ROLLING_FILE_APPENDER_H
00023 #define NUX_CORE_ROLLING_FILE_APPENDER_H
00024 
00025 #include <ostream>
00026 #include <string>
00027 
00028 #include <sigc++/sigc++.h>
00029 
00030 namespace nux {
00031 namespace logging {
00032 
00033 class RollingFileAppender : public std::ostream
00034 {
00035 public:
00036   RollingFileAppender(std::string const& filename);
00037   RollingFileAppender(std::string const& filename,
00038                       unsigned number_of_backup_files,
00039                       unsigned long long max_log_size);
00040   ~RollingFileAppender();
00041 
00042   sigc::signal<void> files_rolled;
00043 };
00044 
00045 }
00046 }
00047 
00048 #endif