00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _LOG4CPP_FIXEDCONTEXTCATEGORY_HH
00011 #define _LOG4CPP_FIXEDCONTEXTCATEGORY_HH
00012
00013 #include "log4cpp/Export.hh"
00014 #include "log4cpp/Category.hh"
00015
00016 namespace log4cpp {
00017
00029 class LOG4CPP_EXPORT FixedContextCategory : public Category {
00030
00031 public:
00032
00042 FixedContextCategory(const std::string& name,
00043 const std::string& context = "");
00044
00045
00049 virtual ~FixedContextCategory();
00050
00055 virtual void setContext(const std::string& context);
00056
00061 virtual std::string getContext() const;
00062
00067 virtual Priority::Value getPriority() const throw();
00068
00077 virtual Priority::Value getChainedPriority() const throw();
00078
00082 virtual void addAppender(Appender* appender);
00083
00087 virtual void addAppender(Appender& appender);
00088
00094 virtual Appender* getAppender() const;
00095
00102 virtual Appender* getAppender(const std::string& name) const;
00103
00108 virtual void removeAllAppenders();
00109
00114 virtual bool ownsAppender() const throw();
00115
00120 virtual bool ownsAppender(Appender* appender)
00121 const throw();
00122
00134 virtual void callAppenders(const LoggingEvent& event) throw();
00135
00139 virtual void setAdditivity(bool additivity);
00140
00144 virtual bool getAdditivity() const throw();
00145
00146 protected:
00147
00153 virtual void _logUnconditionally2(Priority::Value priority,
00154 const std::string& message) throw();
00155
00156 private:
00157
00161 Category& _delegate;
00162
00164 std::string _context;
00165
00166 };
00167
00168 }
00169 #endif // _LOG4CPP_FIXEDCONTEXTCATEGORY_HH