MySQL 8.0.32
Source Code Documentation
Log_to_file_event_handler Class Reference

Class responsible for file based logging. More...

Inheritance diagram for Log_to_file_event_handler:
[legend]

Public Member Functions

bool log_slow (THD *thd, ulonglong current_utime, ulonglong query_start_arg, const char *user_host, size_t user_host_len, ulonglong query_utime, ulonglong lock_utime, bool is_command, const char *sql_text, size_t sql_text_len) override
 Wrapper around File_query_log::write_slow() for slow log. More...
 
bool log_general (THD *thd, ulonglong event_utime, const char *user_host, size_t user_host_len, my_thread_id thread_id, const char *command_type, size_t command_type_len, const char *sql_text, size_t sql_text_len, const CHARSET_INFO *client_cs) override
 Wrapper around File_query_log::write_general() for general log. More...
 
- Public Member Functions inherited from Log_event_handler
 Log_event_handler ()=default
 
virtual ~Log_event_handler ()=default
 

Private Member Functions

 Log_to_file_event_handler ()
 
void cleanup ()
 Close slow and general log files. More...
 
File_query_logget_query_log (enum_log_table_type log_type)
 

Private Attributes

File_query_log mysql_general_log
 
File_query_log mysql_slow_log
 

Friends

class Query_logger
 

Detailed Description

Class responsible for file based logging.

Basically a wrapper around File_query_log.

Constructor & Destructor Documentation

◆ Log_to_file_event_handler()

Log_to_file_event_handler::Log_to_file_event_handler ( )
inlineprivate

Member Function Documentation

◆ cleanup()

void Log_to_file_event_handler::cleanup ( )
inlineprivate

Close slow and general log files.

◆ get_query_log()

File_query_log * Log_to_file_event_handler::get_query_log ( enum_log_table_type  log_type)
inlineprivate
Returns
File_query_log instance responsible for writing to slow/general log.

◆ log_general()

bool Log_to_file_event_handler::log_general ( THD thd,
ulonglong  event_utime,
const char *  user_host,
size_t  user_host_len,
my_thread_id  thread_id,
const char *  command_type,
size_t  command_type_len,
const char *  sql_text,
size_t  sql_text_len,
const CHARSET_INFO client_cs 
)
overridevirtual

Wrapper around File_query_log::write_general() for general log.

See also
Log_event_handler::log_general().

Implements Log_event_handler.

◆ log_slow()

bool Log_to_file_event_handler::log_slow ( THD thd,
ulonglong  current_utime,
ulonglong  query_start_arg,
const char *  user_host,
size_t  user_host_len,
ulonglong  query_utime,
ulonglong  lock_utime,
bool  is_command,
const char *  sql_text,
size_t  sql_text_len 
)
overridevirtual

Wrapper around File_query_log::write_slow() for slow log.

See also
Log_event_handler::log_slow().

Implements Log_event_handler.

Friends And Related Function Documentation

◆ Query_logger

friend class Query_logger
friend

Member Data Documentation

◆ mysql_general_log

File_query_log Log_to_file_event_handler::mysql_general_log
private

◆ mysql_slow_log

File_query_log Log_to_file_event_handler::mysql_slow_log
private

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