77 typedef std::map<DbMessageID, isc::log::MessageID>
MessageMap;
125 template <log_type_t log_type>
133 formatter_ = formatter(message_id, debug_level);
143 template <
typename T,
typename... Args>
145 formatter_.
arg(first);
166 formatter(
DbMessageID const message_id,
int const debug_level = 0);
173 bool isEnabled(
int const debug_level = 0)
const;
203 :
DB_LOG(message_id, debug_level) {
DB_LOG_DEBUG(int const debug_level, DbMessageID const message_id)
DB_LOG & arg(T first, Args...args)
Pass parameters to replace logger placeholders.
DB_LOG(DbMessageID const message_id, int const debug_level=0)
To preserve the old way of logging, this constructor facilitates initiating the DB_LOG_* chain call...
DbMessageID
Database messages.
DB_LOG & arg()
The last invocation of the arg() which is without parameters.
isc::log::Logger & logger_
The logger.
const DbLogger::MessageMap db_message_map
Map of translated messages.
DB_LOG_FATAL(DbMessageID const message_id)
std::map< DbMessageID, isc::log::MessageID > MessageMap
Translation map type.
std::mutex db_logger_mutex
Global mutex to protect logger stack.
DbLogger(isc::log::Logger &logger, const MessageMap &map)
Constructor.
DB_LOG_WARN(DbMessageID const message_id)
log_type_t
log type enumerations for use in DB_LOG specializations
std::list< DbLogger > DbLoggerStack
Database logger stack.
DbLoggerStack db_logger_stack
Global database logger stack (initialized to database logger)
DB_LOG_ERROR(DbMessageID const message_id)
const int DB_DBG_TRACE_DETAIL
Database logging levels.
Defines the logger used by the top-level component of kea-dhcp-ddns.
const isc::log::MessageID & translateMessage(const DbMessageID &id) const
Translate message.
isc::log::Logger logger("asiodns")
Use the ASIO logger.
DB_LOG_INFO(DbMessageID const message_id)
all DB_LOG specializations
void checkDbLoggerStack()
Check database logger stack.
DbLogger db_logger_translator(database_logger, db_message_map)
Database logger translator.
isc::log::Logger database_logger("database")
Common database library logger.
const MessageMap & map_
The translation map.