auth_log.h 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  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 __AUTH_LOG__H
  15. #define __AUTH_LOG__H
  16. #include <log/macros.h>
  17. #include <auth/auth_messages.h>
  18. namespace isc {
  19. namespace auth {
  20. /// \brief Auth Logging
  21. ///
  22. /// Defines the levels used to output debug messages in the "auth" part of
  23. /// the b10-auth program. Higher numbers equate to more verbose (and detailed)
  24. /// output.
  25. // Debug messages indicating normal startup are logged at this debug level.
  26. const int DBG_AUTH_START = DBGLVL_START_SHUT;
  27. // Debug level used to log setting information (such as configuration changes).
  28. const int DBG_AUTH_OPS = DBGLVL_COMMAND;
  29. // Trace detailed operations, including errors raised when processing invalid
  30. // packets. (These are not logged at severities of WARN or higher for fear
  31. // that a set of deliberately invalid packets set to the authoritative server
  32. // could overwhelm the logging.)
  33. const int DBG_AUTH_DETAIL = DBGLVL_TRACE_BASIC;
  34. // This level is used to log the contents of packets received and sent.
  35. const int DBG_AUTH_MESSAGES = DBGLVL_TRACE_DETAIL_DATA;
  36. /// Define the logger for the "auth" module part of b10-auth. We could define
  37. /// a logger in each file, but we would want to define a common name to avoid
  38. /// spelling mistakes, so it is just one small step from there to define a
  39. /// module-common logger.
  40. extern isc::log::Logger auth_logger;
  41. } // namespace nsas
  42. } // namespace isc
  43. #endif // __AUTH_LOG__H