QueryLoggerFile implements logging to a file for the QueryLog class.
This class is not a plugin (class QueryLog is the plugin class), it is a utility class used by the QueryLog class to do the actual logging to the query log file. QueryLog deals with Drizzle; this class deals with formatting the event and writing it to the log file.
Definition at line 34 of file file.h.
bool QueryLoggerFile::openLogFile |
( |
const char * |
file) | |
|
Open new log file, close old log file if successful.
When global system variable query_log_file is changed, update_file() in module.cc is called which calls this function, passing it the new log file name. If opening the new log file succeeds, then the old log file is closed, else the old log if kept, and error is printed and query_log_file is not changed.
- Parameters
-
[in] | file | New log file name to open |
- Return values
-
true | Error, new log file not opened, old log file still open |
false | Success, old log file closed, new log file opened |
Definition at line 61 of file file.cc.