OFFIS DCMTK  Version 3.6.0
syslogap.h
Go to the documentation of this file.
1 // Module: Log4CPLUS
2 // File: syslogappender.h
3 // Created: 6/2001
4 // Author: Tad E. Smith
5 //
6 //
7 // Copyright 2001-2009 Tad E. Smith
8 //
9 // Licensed under the Apache License, Version 2.0 (the "License");
10 // you may not use this file except in compliance with the License.
11 // You may obtain a copy of the License at
12 //
13 // http://www.apache.org/licenses/LICENSE-2.0
14 //
15 // Unless required by applicable law or agreed to in writing, software
16 // distributed under the License is distributed on an "AS IS" BASIS,
17 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
18 // See the License for the specific language governing permissions and
19 // limitations under the License.
20 
23 #ifndef _LOG4CPLUS_SYSLOG_APPENDER_HEADER_
24 #define _LOG4CPLUS_SYSLOG_APPENDER_HEADER_
25 
26 #include "dcmtk/oflog/config.h"
27 
28 #if defined(LOG4CPLUS_HAVE_SYSLOG_H) && !defined(_WIN32)
29 #include "dcmtk/oflog/appender.h"
30 
31 namespace log4cplus {
32 
43  class LOG4CPLUS_EXPORT SysLogAppender : public Appender {
44  public:
45  // Ctors
46  SysLogAppender(const tstring& ident);
47  SysLogAppender(const log4cplus::helpers::Properties properties, log4cplus::tstring& error);
48 
49  // Dtor
50  virtual ~SysLogAppender();
51 
52  // Methods
53  virtual void close();
54 
55  protected:
56  virtual int getSysLogLevel(const LogLevel& ll) const;
57  virtual void append(const spi::InternalLoggingEvent& event);
58 
59  // Data
60  tstring ident;
61 
62  private:
63  // Disallow copying of instances of this class
64  SysLogAppender(const SysLogAppender&);
65  SysLogAppender& operator=(const SysLogAppender&);
66  };
67 
68 } // end namespace log4cplus
69 
70 #endif // defined(HAVE_SYSLOG_H)
71 
72 #endif // _LOG4CPLUS_SYSLOG_APPENDER_HEADER_
73 


Generated on Thu Dec 20 2012 for OFFIS DCMTK Version 3.6.0 by Doxygen 1.8.2