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
00084 virtual void setAppender(Appender* appender);
00085
00091 virtual void setAppender(Appender& appender);
00092
00098 virtual Appender* getAppender() const;
00099
00104 virtual void removeAllAppenders();
00105
00110 virtual bool ownsAppender() const throw();
00111
00123 virtual void callAppenders(const LoggingEvent& event) throw();
00124
00128 virtual void setAdditivity(bool additivity);
00129
00133 virtual bool getAdditivity() const throw();
00134
00135 protected:
00136
00142 virtual void _logUnconditionally2(Priority::Value priority,
00143 const std::string& message) throw();
00144
00145 private:
00146
00150 Category& _delegate;
00151
00153 std::string _context;
00154
00155 };
00156
00157 }
00158 #endif // _LOG4CPP_FIXEDCONTEXTCATEGORY_HH