hooks_log.h 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. // Copyright (C) 2013 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 HOOKS_LOG_H
  15. #define HOOKS_LOG_H
  16. #include <log/macros.h>
  17. #include <hooks/hooks_messages.h>
  18. namespace isc {
  19. namespace hooks {
  20. /// @brief Hooks debug Logging levels
  21. ///
  22. /// Defines the levels used to output debug messages in the Hooks framework.
  23. /// Note that higher numbers equate to more verbose (and detailed) output.
  24. // The first level traces normal operations,
  25. const int HOOKS_DBG_TRACE = DBGLVL_TRACE_BASIC;
  26. // The next level traces each call to hook code.
  27. const int HOOKS_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 HOOKS_DBG_EXTENDED_CALLS = DBGLVL_TRACE_DETAIL_DATA;
  31. /// @brief Hooks 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 hooks_logger;
  37. } // namespace hooks
  38. } // namespace isc
  39. #endif // HOOKS_LOG_H