auth_log.h 2.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556
  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 messages upon shutdown
  28. const int DBG_AUTH_SHUT = DBGLVL_START_SHUT;
  29. // Debug level used to log setting information (such as configuration changes).
  30. const int DBG_AUTH_OPS = DBGLVL_COMMAND;
  31. // Trace detailed operations, including errors raised when processing invalid
  32. // packets. (These are not logged at severities of WARN or higher for fear
  33. // that a set of deliberately invalid packets set to the authoritative server
  34. // could overwhelm the logging.)
  35. const int DBG_AUTH_DETAIL = DBGLVL_TRACE_BASIC;
  36. // This level is used to log the contents of packets received and sent.
  37. const int DBG_AUTH_MESSAGES = DBGLVL_TRACE_DETAIL_DATA;
  38. /// Define the logger for the "auth" module part of b10-auth. We could define
  39. /// a logger in each file, but we would want to define a common name to avoid
  40. /// spelling mistakes, so it is just one small step from there to define a
  41. /// module-common logger.
  42. extern isc::log::Logger auth_logger;
  43. } // namespace nsas
  44. } // namespace isc
  45. #endif // __AUTH_LOG__H