dhcpsrv_log.h 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061
  1. // Copyright (C) 2011-2015 Internet Systems Consortium, Inc. ("ISC")
  2. //
  3. // This Source Code Form is subject to the terms of the Mozilla Public
  4. // License, v. 2.0. If a copy of the MPL was not distributed with this
  5. // file, You can obtain one at http://mozilla.org/MPL/2.0/.
  6. #ifndef DHCPSRV_LOG_H
  7. #define DHCPSRV_LOG_H
  8. #include <dhcpsrv/dhcpsrv_messages.h>
  9. #include <log/macros.h>
  10. namespace isc {
  11. namespace dhcp {
  12. ///@{
  13. /// \brief DHCP server library logging levels
  14. ///
  15. /// Defines the levels used to output debug messages in the DHCP server
  16. /// library. Note that higher numbers equate to more verbose (and detailed)
  17. /// output.
  18. /// @brief Traces normal operations
  19. ///
  20. /// E.g. sending a query to the database etc.
  21. const int DHCPSRV_DBG_TRACE = DBGLVL_TRACE_BASIC;
  22. /// @brief Records the results of the lookups
  23. ///
  24. /// Using the example of tracing queries from the backend database, this will
  25. /// just record the summary results.
  26. const int DHCPSRV_DBG_RESULTS = DBGLVL_TRACE_BASIC_DATA;
  27. /// @brief Additional information
  28. ///
  29. /// Record detailed tracing. This is generally reserved for tracing access to
  30. /// the lease database.
  31. const int DHCPSRV_DBG_TRACE_DETAIL = DBGLVL_TRACE_DETAIL;
  32. /// @brief Additional information
  33. ///
  34. /// Record detailed (and verbose) data on the server.
  35. const int DHCPSRV_DBG_TRACE_DETAIL_DATA = DBGLVL_TRACE_DETAIL_DATA;
  36. // Trace hook related operations
  37. const int DHCPSRV_DBG_HOOKS = DBGLVL_TRACE_BASIC;
  38. ///@}
  39. /// \brief DHCP server library Logger
  40. ///
  41. /// Define the logger used to log messages. We could define it in multiple
  42. /// modules, but defining in a single module and linking to it saves time and
  43. /// space.
  44. extern isc::log::Logger dhcpsrv_logger;
  45. } // namespace dhcp
  46. } // namespace isc
  47. #endif // DHCPSRV_LOG_H