oflog/include/dcmtk/oflog/syslogap.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 2001-2009 Tad E. Smith
00008 //
00009 // Licensed under the Apache License, Version 2.0 (the "License");
00010 // you may not use this file except in compliance with the License.
00011 // You may obtain a copy of the License at
00012 //
00013 //     http://www.apache.org/licenses/LICENSE-2.0
00014 //
00015 // Unless required by applicable law or agreed to in writing, software
00016 // distributed under the License is distributed on an "AS IS" BASIS,
00017 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
00018 // See the License for the specific language governing permissions and
00019 // limitations under the License.
00020 
00023 #ifndef _LOG4CPLUS_SYSLOG_APPENDER_HEADER_
00024 #define _LOG4CPLUS_SYSLOG_APPENDER_HEADER_
00025 
00026 #include "dcmtk/oflog/config.h"
00027 
00028 #if defined(LOG4CPLUS_HAVE_SYSLOG_H) && !defined(_WIN32)
00029 #include "dcmtk/oflog/appender.h"
00030 
00031 namespace log4cplus {
00032 
00043     class LOG4CPLUS_EXPORT SysLogAppender : public Appender {
00044     public:
00045       // Ctors
00046         SysLogAppender(const tstring& ident);
00047         SysLogAppender(const log4cplus::helpers::Properties properties, log4cplus::tstring& error);
00048 
00049       // Dtor
00050         virtual ~SysLogAppender();
00051 
00052       // Methods
00053         virtual void close();
00054 
00055     protected:
00056         virtual int getSysLogLevel(const LogLevel& ll) const;
00057         virtual void append(const spi::InternalLoggingEvent& event);
00058 
00059       // Data
00060         tstring ident;
00061 
00062     private:
00063       // Disallow copying of instances of this class
00064         SysLogAppender(const SysLogAppender&);
00065         SysLogAppender& operator=(const SysLogAppender&);
00066     };
00067 
00068 } // end namespace log4cplus
00069 
00070 #endif // defined(HAVE_SYSLOG_H)
00071 
00072 #endif // _LOG4CPLUS_SYSLOG_APPENDER_HEADER_
00073 


Generated on 6 Jan 2011 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.5.1