dhcp6_log.h 2.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. // Copyright (C) 2012 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 DHCP6_LOG_H
  15. #define DHCP6_LOG_H
  16. #include <dhcp6/dhcp6_messages.h>
  17. #include <log/logger_support.h>
  18. #include <log/macros.h>
  19. namespace isc {
  20. namespace dhcp {
  21. /// \brief DHCP6 Logging
  22. ///
  23. /// Defines the levels used to output debug messages in the non-library part of
  24. /// the b10-dhcp6 program. Higher numbers equate to more verbose (and detailed)
  25. /// output.
  26. // Debug levels used to log information during startup and shutdown.
  27. const int DBG_DHCP6_START = DBGLVL_START_SHUT;
  28. const int DBG_DHCP6_SHUT = DBGLVL_START_SHUT;
  29. // Debug level used to log setting information (such as configuration changes).
  30. const int DBG_DHCP6_COMMAND = DBGLVL_COMMAND;
  31. // Trace basic operations within the code.
  32. const int DBG_DHCP6_BASIC = DBGLVL_TRACE_BASIC;
  33. // Trace hook related operations
  34. const int DBG_DHCP6_HOOKS = DBGLVL_TRACE_BASIC;
  35. // Trace detailed operations, including errors raised when processing invalid
  36. // packets. (These are not logged at severities of WARN or higher for fear
  37. // that a set of deliberately invalid packets set to the server could overwhelm
  38. // the logging.)
  39. const int DBG_DHCP6_DETAIL = DBGLVL_TRACE_DETAIL;
  40. // This level is used to log the contents of packets received and sent.
  41. const int DBG_DHCP6_DETAIL_DATA = DBGLVL_TRACE_DETAIL_DATA;
  42. /// Define the logger for the "dhcp6" module part of b10-dhcp6. We could define
  43. /// a logger in each file, but we would want to define a common name to avoid
  44. /// spelling mistakes, so it is just one small step from there to define a
  45. /// module-common logger.
  46. extern isc::log::Logger dhcp6_logger;
  47. } // namespace dhcp6
  48. } // namespace isc
  49. #endif // DHCP6_LOG_H