1 // Module:  Log4CPLUS
 2 // File:    nullappender.h
 3 // Created: 6/2003
 4 // Author:  Tad E. Smith
 5 //
 6 //
 7 // Copyright (C) Tad E. Smith  All rights reserved.
 8 //
 9 // This software is published under the terms of the Apache Software
10 // License version 1.1, a copy of which has been included with this
11 // distribution in the LICENSE.APL file.
12 //
13 
14 /** @file */
15 
16 #ifndef _LOG4CPLUS_NULL_APPENDER_HEADER_
17 #define _LOG4CPLUS_NULL_APPENDER_HEADER_
18 
19 #include <log4cplus/config.h>
20 #include <log4cplus/appender.h>
21 #include <log4cplus/helpers/property.h>
22 
23 
24 namespace log4cplus {
25 
26     /**
27      * Appends log events to a file. 
28      */
29     class LOG4CPLUS_EXPORT NullAppender : public Appender {
30     public:
31       // Ctors
32         NullAppender();
33         NullAppender(const log4cplus::helpers::Properties& properties);
34 
35       // Dtor
36         virtual ~NullAppender();
37 
38       // Methods
39         virtual void close();
40 
41     protected:
42         virtual void append(const log4cplus::spi::InternalLoggingEvent& event);
43 
44     private:
45       // Disallow copying of instances of this class
46         NullAppender(const NullAppender&);
47         NullAppender& operator=(const NullAppender&);
48     };
49 
50 } // end namespace log4cplus
51 
52 #endif // _LOG4CPLUS_NULL_APPENDER_HEADER_


syntax highlighted by Code2HTML, v. 0.9.1