LevelEvaluator.hh 747 B

1234567891011121314151617181920212223242526
  1. /*
  2. * Copyright 2002, LifeLine Networks BV (www.lifeline.nl). All rights reserved.
  3. * Copyright 2002, Bastiaan Bakker. All rights reserved.
  4. *
  5. * See the COPYING file for the terms of usage and distribution.
  6. */
  7. #if !defined(h_3491ecd0_3891_4902_b3ba_15b15d98ae49)
  8. #define h_3491ecd0_3891_4902_b3ba_15b15d98ae49
  9. #include <log4cpp/TriggeringEventEvaluator.hh>
  10. namespace log4cpp
  11. {
  12. class LOG4CPP_EXPORT LevelEvaluator : public TriggeringEventEvaluator
  13. {
  14. public:
  15. LevelEvaluator(Priority::Value level) : level_(level) {}
  16. virtual bool eval(const LoggingEvent& event) const { return event.priority <= level_; }
  17. private:
  18. Priority::Value level_;
  19. };
  20. }
  21. #endif // h_3491ecd0_3891_4902_b3ba_15b15d98ae49