log4cpp: LevelEvaluator.hh Source File

- Main Page
- Namespaces
- Classes
- Files
- Related Pages

- File List
- File Members

# LevelEvaluator.hh

Go to the documentation of this file.

    00001 #if !defined(h_3491ecd0_3891_4902_b3ba_15b15d98ae49)
    00002 #define h_3491ecd0_3891_4902_b3ba_15b15d98ae49
    00003
    00004 #include <log4cpp/TriggeringEventEvaluator.hh>
    00005
    00006 namespace log4cpp
    00007 {
    00008    class LOG4CPP_EXPORT LevelEvaluator : public TriggeringEventEvaluator
    00009    {
    00010       public:
    00011          LevelEvaluator(Priority::Value level) : level_(level) {}
    00012          virtual bool eval(const LoggingEvent& event) const { return event.priority <= level_; }
    00013
    00014       private:
    00015          Priority::Value level_;
    00016    };
    00017 }
    00018
    00019 #endif // h_3491ecd0_3891_4902_b3ba_15b15d98ae49