eval_log.h 1.8 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849
  1. // Copyright (C) 2015 Internet Systems Consortium, Inc. ("ISC")
  2. //
  3. // Permission to use, copy, modify, and/or distribute this software for any
  4. // purpose with or without fee is hereby granted, provided that the above
  5. // copyright notice and this permission notice appear in all copies.
  6. //
  7. // THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES WITH
  8. // REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY
  9. // AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR ANY SPECIAL, DIRECT,
  10. // INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  11. // LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE
  12. // OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
  13. // PERFORMANCE OF THIS SOFTWARE.
  14. #ifndef EVAL_LOG_H
  15. #define EVAL_LOG_H
  16. #include <log/macros.h>
  17. #include <eval/eval_messages.h>
  18. namespace isc {
  19. namespace dhcp {
  20. /// @brief Eval debug Logging levels
  21. ///
  22. /// Defines the levels used to output debug messages in the eval (classification) code.
  23. /// Note that higher numbers equate to more verbose (and detailed) output.
  24. // The first level traces normal operations,
  25. const int EVAL_DBG_TRACE = DBGLVL_TRACE_BASIC;
  26. // The next level traces each call to hook code.
  27. const int EVAL_DBG_CALLS = DBGLVL_TRACE_BASIC_DATA;
  28. // Additional information on the calls. Report each call to a callout (even
  29. // if there are multiple callouts on a hook) and each status return.
  30. const int EVAL_DBG_EXTENDED_CALLS = DBGLVL_TRACE_DETAIL_DATA;
  31. /// @brief Eval Logger
  32. ///
  33. /// Define the logger used to log messages. We could define it in multiple
  34. /// modules, but defining in a single module and linking to it saves time and
  35. /// space.
  36. extern isc::log::Logger eval_logger;
  37. } // namespace dhcp
  38. } // namespace isc
  39. #endif // EVAL_LOG_H