MySQL 8.4.2
Source Code Documentation
auth_ldap_sasl_client::Ldap_logger Class Reference

Class representing logger for LDAP plugins. More...

#include <log_client.h>

Static Public Member Functions

static void create_logger (ldap_log_level log_level=LDAP_LOG_LEVEL_NONE)
 Creates the logger object. More...
 
static void destroy_logger ()
 Destroys the logger object. More...
 
static void log_dbg_msg (Message msg)
 Log a debug message. More...
 
static void log_info_msg (Message msg)
 Log an info message. More...
 
static void log_warning_msg (Message msg)
 Log a warning message. More...
 
static void log_error_msg (Message msg)
 Log an error message. More...
 

Private Types

using Message = std::initializer_list< const char * >
 type of message to be logged More...
 

Private Member Functions

 Ldap_logger (ldap_log_level level)
 Private constructor to assure singleton pattern. More...
 
 ~Ldap_logger ()
 Destructor. More...
 
template<ldap_log_level level, const char * prefix>
void log (Message msg)
 Compose the log message and write it. More...
 

Private Attributes

Ldap_log_writer_errorm_log_writer
 Log writer. More...
 
ldap_log_level m_log_level
 Log level. More...
 

Static Private Attributes

static Ldap_loggerm_logger = nullptr
 Pointer to the only log object. More...
 

Detailed Description

Class representing logger for LDAP plugins.

Singleton.

Member Typedef Documentation

◆ Message

using auth_ldap_sasl_client::Ldap_logger::Message = std::initializer_list<const char *>
private

type of message to be logged

Constructor & Destructor Documentation

◆ Ldap_logger()

auth_ldap_sasl_client::Ldap_logger::Ldap_logger ( ldap_log_level  level)
private

Private constructor to assure singleton pattern.

Parameters
level[in] log level

◆ ~Ldap_logger()

auth_ldap_sasl_client::Ldap_logger::~Ldap_logger ( )
private

Destructor.

Member Function Documentation

◆ create_logger()

void auth_ldap_sasl_client::Ldap_logger::create_logger ( ldap_log_level  log_level = LDAP_LOG_LEVEL_NONE)
static

Creates the logger object.

Parameters
log_level[in] log level

◆ destroy_logger()

void auth_ldap_sasl_client::Ldap_logger::destroy_logger ( )
static

Destroys the logger object.

◆ log()

template<ldap_log_level level, const char * prefix>
void auth_ldap_sasl_client::Ldap_logger::log ( Message  msg)
inlineprivate

Compose the log message and write it.

Template Parameters
levellog level
prefixlog level name
Parameters
msg[in] message to be logged

◆ log_dbg_msg()

void auth_ldap_sasl_client::Ldap_logger::log_dbg_msg ( Message  msg)
static

Log a debug message.

Parameters
msg[in] the message

◆ log_error_msg()

void auth_ldap_sasl_client::Ldap_logger::log_error_msg ( Message  msg)
static

Log an error message.

Parameters
msg[in] the message

◆ log_info_msg()

void auth_ldap_sasl_client::Ldap_logger::log_info_msg ( Message  msg)
static

Log an info message.

Parameters
msg[in] the message

◆ log_warning_msg()

void auth_ldap_sasl_client::Ldap_logger::log_warning_msg ( Message  msg)
static

Log a warning message.

Parameters
msg[in] the message

Member Data Documentation

◆ m_log_level

ldap_log_level auth_ldap_sasl_client::Ldap_logger::m_log_level
private

Log level.

◆ m_log_writer

Ldap_log_writer_error* auth_ldap_sasl_client::Ldap_logger::m_log_writer
private

Log writer.

◆ m_logger

Ldap_logger * auth_ldap_sasl_client::Ldap_logger::m_logger = nullptr
staticprivate

Pointer to the only log object.


The documentation for this class was generated from the following files: