1  #ifndef PATTERN_LAYOUT_HH
2 #define PATTERN_LAYOUT_HH
3 
4 #include "log4cpp/Configurator.hh"
5 #include "log4cpp/Layout.hh"
6 #include <string>
7 
8 namespace log4cpp {
9 
10   class LoggingEvent;
11 
12   /// Noop class that mimics the same class in the log4cpp library
13   class PatternLayout : public Layout
14   {
15   public:
16     /// Single constructor
17     PatternLayout ();
18     virtual ~PatternLayout ();
19 
20     /// Noop method for formatting an event
21     virtual std::string format(const LoggingEvent &event);
22 
23     /// Noop method for setting the conversion pattern. This used to throw
24     /// ConfigureFailure but newer compilers do not like explicit throws
25     void setConversionPattern (const std::string &conversionPattern);
26 
27   private:
28     std::string m_conversionPattern;
29   };
30 }
31 
32 #endif // PATTERN_LAYOUT_HH
33