FixedContextCategory.hh
Go to the documentation of this file.
1 /*
2  * FixedContextCategory.hh
3  *
4  * Copyright 2001, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
5  * Copyright 2001, Bastiaan Bakker. All rights reserved.
6  *
7  * See the COPYING file for the terms of usage and distribution.
8  */
9 
10 #ifndef _LOG4CPP_FIXEDCONTEXTCATEGORY_HH
11 #define _LOG4CPP_FIXEDCONTEXTCATEGORY_HH
12 
13 #include <log4cpp/Portability.hh>
14 #include <log4cpp/Category.hh>
15 
17 
30 
31 public:
32 
40  FixedContextCategory(const std::string& name,
41  const std::string& context = "");
42 
43 
47  virtual ~FixedContextCategory();
48 
53  virtual void setContext(const std::string& context);
54 
59  virtual std::string getContext() const;
60 
65  virtual Priority::Value getPriority() const throw();
66 
75  virtual Priority::Value getChainedPriority() const throw();
76 
80  virtual void addAppender(Appender* appender) throw();
81 
85  virtual void addAppender(Appender& appender);
86 
92  virtual Appender* getAppender() const;
93 
100  virtual Appender* getAppender(const std::string& name) const;
101 
107  virtual AppenderSet getAllAppenders() const;
108 
113  virtual void removeAllAppenders();
114 
119  virtual bool ownsAppender() const throw();
120 
125  virtual bool ownsAppender(Appender* appender)
126  const throw();
127 
139  virtual void callAppenders(const LoggingEvent& event) throw();
140 
144  virtual void setAdditivity(bool additivity);
145 
149  virtual bool getAdditivity() const throw();
150 
151 protected:
152 
158  virtual void _logUnconditionally2(Priority::Value priority,
159  const std::string& message) throw();
160 
161 private:
162 
167 
169  std::string _context;
170 
171 };
172 
174 #endif // _LOG4CPP_FIXEDCONTEXTCATEGORY_HH
#define LOG4CPP_NS_END
Definition: Portability.hh:50
virtual Priority::Value getChainedPriority() const
Starting from this Category, search the category hierarchy for a set priority and return it...
virtual AppenderSet getAllAppenders() const
Returns the set of Appenders currently attached to this Catogory.
The top level namespace for all &#39;Log for C++&#39; types and classes.
Definition: LoggingEvent.hh:32
virtual void _logUnconditionally2(Priority::Value priority, const std::string &message)
Unconditionally log a message with the specified priority.
virtual Priority::Value getPriority() const
Returns the assigned Priority, if any, for this Category.
virtual void setAdditivity(bool additivity)
Set the additivity flag for this Category instance.
virtual void callAppenders(const LoggingEvent &event)
Call the appenders in the hierarchy starting at this.
#define LOG4CPP_EXPORT
Definition: Export.hh:21
This is the central class in the log4j package.
Definition: Category.hh:34
std::string _context
The context of this FixedContextCategory.
virtual void removeAllAppenders()
Removes all appenders for this Category.
virtual Appender * getAppender() const
Returns the first Appender for this Category, or NULL if no Appender has been set.
std::set< Appender * > AppenderSet
Definition: Appender.hh:153
virtual void addAppender(Appender *appender)
Adds an Appender to this Category.
This Category subclass replaces the NDC field in LoggingEvents with a fixed context string...
virtual bool ownsAppender() const
Returns true if the Category owns the first Appender in its Appender set.
Definition: Category.hh:227
virtual bool getAdditivity() const
Returns the additivity flag for this Category instance.
int Value
The type of Priority Values.
Definition: Priority.hh:87
Implement this interface for your own strategies for printing log statements.
Definition: Appender.hh:33
Category & _delegate
The delegate category of this FixedContextCategory.
#define LOG4CPP_NS_BEGIN
Definition: Portability.hh:49


rc_genicam_api
Author(s): Heiko Hirschmueller
autogenerated on Wed Mar 17 2021 02:48:40