# syslogappender.h

Go to the documentation of this file.

    00001 // Module:  Log4CPLUS
    00002 // File:    syslogappender.h
    00003 // Created: 6/2001
    00004 // Author:  Tad E. Smith
    00005 //
    00006 //
    00007 // Copyright (C) Tad E. Smith  All rights reserved.
    00008 //
    00009 // This software is published under the terms of the Apache Software
    00010 // License version 1.1, a copy of which has been included with this
    00011 // distribution in the LICENSE.APL file.
    00012 //
    00013
    00016 #ifndef _LOG4CPLUS_SYSLOG_APPENDER_HEADER_
    00017 #define _LOG4CPLUS_SYSLOG_APPENDER_HEADER_
    00018
    00019 #include <log4cplus/config.h>
    00020
    00021 #if defined(HAVE_SYSLOG_H) && !defined(_WIN32)
    00022 #include <log4cplus/appender.h>
    00023
    00024 namespace log4cplus {
    00025
    00029     class SysLogAppender : public Appender {
    00030     public:
    00031       // Ctors
    00032         SysLogAppender(const tstring& ident);
    00033         SysLogAppender(const log4cplus::helpers::Properties properties);
    00034
    00035       // Dtor
    00036         virtual ~SysLogAppender();
    00037
    00038       // Methods
    00039         virtual void close();
    00040
    00041     protected:
    00042         virtual int getSysLogLevel(const LogLevel& ll) const;
    00043         virtual void append(const spi::InternalLoggingEvent& event);
    00044
    00045       // Data
    00046         tstring ident;
    00047
    00048     private:
    00049       // Disallow copying of instances of this class
    00050         SysLogAppender(const SysLogAppender&);
    00051         SysLogAppender& operator=(const SysLogAppender&);
    00052     };
    00053
    00054 } // end namespace log4cplus
    00055
    00056 #endif // defined(HAVE_SYSLOG_H)
    00057
    00058 #endif // _LOG4CPLUS_SYSLOG_APPENDER_HEADER_
    00059