hosts_log.h 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  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 HOSTS_LOG_H
  15. #define HOSTS_LOG_H
  16. #include <dhcpsrv/hosts_messages.h>
  17. #include <log/macros.h>
  18. namespace isc {
  19. namespace dhcp {
  20. ///@{
  21. /// \brief Logging levels for the host reservations management.
  22. ///
  23. /// Defines the levels used to output debug messages during the host
  24. /// reservations management, i.e. retrieving and adding host reservations.
  25. /// Note that higher numbers equate to more verbose(and detailed) output.
  26. /// @brief Traces normal operations
  27. ///
  28. /// An example of the normal operation is the call to one of the functions
  29. /// which retrieve the reservations or add new reservation.
  30. const int HOSTS_DBG_TRACE = DBGLVL_TRACE_BASIC;
  31. /// @brief Records the results of the lookups
  32. ///
  33. /// Messages logged at this level will typically contain summary of the
  34. /// data retrieved.
  35. const int HOSTS_DBG_RESULTS = DBGLVL_TRACE_BASIC_DATA;
  36. /// @brief Record detailed traces
  37. ///
  38. /// Messages logged at this level will log detailed tracing information.
  39. const int HOSTS_DBG_TRACE_DETAIL = DBGLVL_TRACE_DETAIL;
  40. /// @brief Records detailed results of lookups.
  41. ///
  42. /// Messages logged at this level will contain detailed results.
  43. const int HOSTS_DBG_TRACE_DETAIL_DATA = DBGLVL_TRACE_DETAIL_DATA;
  44. ///@}
  45. /// @brief Logger for the @c HostMgr and the code it calls.
  46. ///
  47. /// Define the logger used to log messages in @c HostMgr and the code it
  48. /// calls to manage host reservations.
  49. extern isc::log::Logger hosts_logger;
  50. } // namespace dhcp
  51. } // namespace isc
  52. #endif // HOSTS_LOG_H