1 // Copyright (C) 2013-2015,2017 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 7 #ifndef HOOKS_LOG_H 8 #define HOOKS_LOG_H 9 10 #include <log/macros.h> 11 #include <hooks/hooks_messages.h> 12 13 namespace isc { 14 namespace hooks { 15 16 /// @brief Hooks debug Logging levels 17 /// 18 /// Defines the levels used to output debug messages in the Hooks framework. 19 /// Note that higher numbers equate to more verbose (and detailed) output. 20 21 // The first level traces normal operations, 22 extern const int HOOKS_DBG_TRACE; 23 24 // The next level traces each call to hook code. 25 extern const int HOOKS_DBG_CALLS; 26 27 // Additional information on the calls. Report each call to a callout (even 28 // if there are multiple callouts on a hook) and each status return. 29 extern const int HOOKS_DBG_EXTENDED_CALLS; 30 31 32 /// @brief Hooks Logger 33 /// 34 /// Define the logger used to log messages. We could define it in multiple 35 /// modules, but defining in a single module and linking to it saves time and 36 /// space. 37 extern isc::log::Logger hooks_logger; 38 39 /// @brief Callouts logger 40 /// 41 /// This is the specialized logger used to log messages pertaining to the 42 /// callouts execution. In particular, it logs when the callout is invoked 43 /// and when it ends. It also logs the callout execution times. 44 extern isc::log::Logger callouts_logger; 45 46 } // namespace hooks 47 } // namespace isc 48 49 #endif // HOOKS_LOG_H 50