resolve_log.h 1.7 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  1. // Copyright (C) 2011 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 __RESOLVE_LOG__H
  15. #define __RESOLVE_LOG__H
  16. #include <log/macros.h>
  17. #include "resolvedef.h"
  18. namespace isc {
  19. namespace resolve {
  20. /// \brief Resolver Library Logging
  21. ///
  22. /// Defines the levels used to output debug messages in the resolver library.
  23. /// Note that higher numbers equate to more verbose (and detailed) output.
  24. // The first level traces normal operations
  25. const int RESLIB_DBG_TRACE = 10;
  26. // The next level extends the normal operations and records the results of the
  27. // lookups.
  28. const int RESLIB_DBG_RESULTS = 20;
  29. // Report cache lookups and results
  30. const int RESLIB_DBG_CACHE = 40;
  31. // Indicate when callbacks are called
  32. const int RESLIB_DBG_CB = 50;
  33. /// \brief Resolver Library Logger
  34. ///
  35. /// Define the logger used to log messages. We could define it in multiple
  36. /// modules, but defining in a single module and linking to it saves time and
  37. /// space.
  38. extern isc::log::Logger logger;
  39. } // namespace resolve
  40. } // namespace isc
  41. #endif // __RESOLVE_LOG__H