56 }
catch (
const std::out_of_range&) {
69DB_LOG<fatal>::formatter(
DbMessageID const message_id,
77DB_LOG<error>::formatter(
DbMessageID const message_id,
85DB_LOG<warn>::formatter(
DbMessageID const message_id,
93DB_LOG<info>::formatter(
DbMessageID const message_id,
101DB_LOG<debug>::formatter(
DbMessageID const message_id,
102 int const debug_level ) {
110DB_LOG<fatal>::isEnabled(
int const )
const {
116DB_LOG<error>::isEnabled(
int const )
const {
122DB_LOG<warn>::isEnabled(
int const )
const {
128DB_LOG<info>::isEnabled(
int const )
const {
134DB_LOG<debug>::isEnabled(
int const debug_level )
const {
A generic exception that is thrown when an unexpected error condition occurs.
const MessageMap & map_
The translation map.
const isc::log::MessageID & translateMessage(const DbMessageID &id) const
Translate message.
std::map< DbMessageID, isc::log::MessageID > MessageMap
Translation map type.
We want to reuse the database backend connection and exchange code for other uses,...
#define isc_throw(type, stream)
A shortcut macro to insert known values into exception arguments.
const int DB_DBG_TRACE_DETAIL
Database logging levels.
const isc::log::MessageID DATABASE_PGSQL_FATAL_ERROR
isc::log::Logger database_logger("database")
Common database library logger.
const isc::log::MessageID DATABASE_MYSQL_COMMIT
std::list< DbLogger > DbLoggerStack
Database logger stack.
const isc::log::MessageID DATABASE_MYSQL_INITIALIZE_SCHEMA
const isc::log::MessageID DATABASE_PGSQL_INITIALIZE_SCHEMA
DbMessageID
Database messages.
@ MYSQL_START_TRANSACTION
@ PGSQL_ROLLBACK_SAVEPOINT
@ MYSQL_INITIALIZE_SCHEMA
@ PGSQL_TCP_USER_TIMEOUT_UNSUPPORTED
@ PGSQL_START_TRANSACTION
@ PGSQL_INITIALIZE_SCHEMA
const isc::log::MessageID DATABASE_PGSQL_COMMIT
DbLoggerStack db_logger_stack
Global database logger stack (initialized to database logger)
const isc::log::MessageID DATABASE_PGSQL_CREATE_SAVEPOINT
const isc::log::MessageID DATABASE_INVALID_ACCESS
const isc::log::MessageID DATABASE_PGSQL_ROLLBACK_SAVEPOINT
const isc::log::MessageID DATABASE_MYSQL_ROLLBACK
std::mutex db_logger_mutex
Global mutex to protect logger stack.
void checkDbLoggerStack()
Check database logger stack.
const isc::log::MessageID DATABASE_PGSQL_DEALLOC_ERROR
const DbLogger::MessageMap db_message_map
Map of translated messages.
DbLogger db_logger_translator(database_logger, db_message_map)
Database logger translator.
const isc::log::MessageID DATABASE_PGSQL_START_TRANSACTION
const isc::log::MessageID DATABASE_PGSQL_TCP_USER_TIMEOUT_UNSUPPORTED
const isc::log::MessageID DATABASE_PGSQL_ROLLBACK
const isc::log::MessageID DATABASE_MYSQL_FATAL_ERROR
const isc::log::MessageID DATABASE_MYSQL_START_TRANSACTION
const int DBGLVL_TRACE_DETAIL
Trace detailed operations.
Defines the logger used by the top-level component of kea-lfc.