00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _LOG4CPP_FILEAPPENDER_HH
00011 #define _LOG4CPP_FILEAPPENDER_HH
00012
00013 #include <string>
00014 #include <stdarg.h>
00015 #include "log4cpp/Export.hh"
00016 #include "log4cpp/LayoutAppender.hh"
00017
00018 namespace log4cpp {
00019
00020 class LOG4CPP_EXPORT FileAppender : public LayoutAppender {
00021 public:
00022 FileAppender(const std::string& name, const std::string& fileName);
00023 FileAppender(const std::string& name, int fd);
00024 virtual ~FileAppender();
00025
00026 virtual bool reopen();
00027 virtual void close();
00028
00029 protected:
00030 virtual void _append(const LoggingEvent& event);
00031
00032 const std::string _fileName;
00033 int _fd;
00034 };
00035 }
00036
00037 #endif // _LOG4CPP_FILEAPPENDER_HH