00001
00002
00003
00004
00005
00006
00007
00008
00009
00010 #ifndef _LOG4SHIB_FIXEDCONTEXTCATEGORY_HH
00011 #define _LOG4SHIB_FIXEDCONTEXTCATEGORY_HH
00012
00013 #include <log4shib/Portability.hh>
00014 #include <log4shib/Category.hh>
00015
00016 namespace log4shib {
00017
00029 class LOG4SHIB_EXPORT FixedContextCategory : public Category {
00030
00031 public:
00032
00040 FixedContextCategory(const std::string& name,
00041 const std::string& context = "");
00042
00043
00047 virtual ~FixedContextCategory();
00048
00053 virtual void setContext(const std::string& context);
00054
00059 virtual std::string getContext() const;
00060
00065 virtual Priority::Value getPriority() const throw();
00066
00075 virtual Priority::Value getChainedPriority() const throw();
00076
00080 virtual void addAppender(Appender* appender) throw();
00081
00085 virtual void addAppender(Appender& appender);
00086
00092 virtual Appender* getAppender() const;
00093
00100 virtual Appender* getAppender(const std::string& name) const;
00101
00107 virtual AppenderSet getAllAppenders() const;
00108
00113 virtual void removeAllAppenders();
00114
00119 virtual bool ownsAppender(Appender* appender)
00120 const throw();
00121
00133 virtual void callAppenders(const LoggingEvent& event) throw();
00134
00138 virtual void setAdditivity(bool additivity);
00139
00143 virtual bool getAdditivity() const throw();
00144
00145 protected:
00146
00152 virtual void _logUnconditionally2(Priority::Value priority,
00153 const std::string& message) throw();
00154
00155 private:
00156
00160 Category& _delegate;
00161
00163 std::string _context;
00164
00165 };
00166
00167 }
00168 #endif // _LOG4SHIB_FIXEDCONTEXTCATEGORY_HH