Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members   Related Pages  

PatternLayout.hh

Go to the documentation of this file.
00001 /*
00002  * PatternLayout.hh
00003  *
00004  * Copyright 2001, Glen Scott. All rights reserved.
00005  *
00006  * See the COPYING file for the terms of usage and distribution.
00007  */
00008 
00009 #ifndef _LOG4CPP_PATTERNLAYOUT_HH
00010 #define _LOG4CPP_PATTERNLAYOUT_HH
00011 
00012 #include <log4cpp/Portability.hh>
00013 #include <log4cpp/Layout.hh>
00014 
00015 namespace log4cpp {
00016 
00020     class LOG4CPP_EXPORT PatternLayout : public Layout {
00021         public:
00022         PatternLayout();
00023         virtual ~PatternLayout();
00024         
00025         // NOTE: All double percentage signs ('%%') followed by a character
00026         //       in the following comments should actually be a single char.
00027         //       The doubles are included so that doxygen will print them correctly.
00033         virtual std::string format(const LoggingEvent& event);
00034 
00060         bool setConversionPattern(std::string conversionPattern);
00061 
00062         private:
00063         std::string convPatn;   // The conversion pattern set for this layout
00075         std::string doFormat(const LoggingEvent& event, 
00076                              std::string conversionPattern,
00077                              bool *success);        
00078     };        
00079 }
00080 
00081 #endif // _LOG4CPP_PATTERNLAYOUT_HH

Generated on Thu Aug 15 00:00:20 2002 for log4cpp by doxygen1.2.14 written by Dimitri van Heesch, © 1997-2002