diff options
author | Alexey Botchkov <holyfoot@askmonty.org> | 2012-03-14 00:55:56 +0400 |
---|---|---|
committer | Alexey Botchkov <holyfoot@askmonty.org> | 2012-03-14 00:55:56 +0400 |
commit | 07a82c58a7306bd8ef889dd912cdc437a9f83a89 (patch) | |
tree | edd7edc02e96ad32d8f7d8d5137db548562be16e /sql/sql_plugin_services.h | |
parent | 92f31d8070738206c5b64d3ab5cc9a0cb05c56fa (diff) | |
download | mariadb-git-07a82c58a7306bd8ef889dd912cdc437a9f83a89.tar.gz |
MDEV-15 Log all SQL errors.
Added the logger service that provides us with the rotating logs.
The plugin SQL_ERROR_LOG added. It logs the errors using the 'logger service'
for the rotating log files.
the example record from the log:
2012-03-09 15:07:29 root[root] @ localhost [] ERROR 1146: Table 'test.xyz' doesn't exist : select * from test.xyz
Diffstat (limited to 'sql/sql_plugin_services.h')
-rw-r--r-- | sql/sql_plugin_services.h | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/sql/sql_plugin_services.h b/sql/sql_plugin_services.h index 7f2a4e5f955..bd6d136585a 100644 --- a/sql/sql_plugin_services.h +++ b/sql/sql_plugin_services.h @@ -54,12 +54,21 @@ static struct progress_report_service_st progress_report_handler= { set_thd_proc_info }; +static struct logger_service_st logger_handler= { + logger_open, + logger_close, + logger_vprintf, + logger_printf, + logger_rotate +}; + static struct st_service_ref list_of_services[]= { { "my_snprintf_service", VERSION_my_snprintf, &my_snprintf_handler }, { "thd_alloc_service", VERSION_thd_alloc, &thd_alloc_handler }, { "thd_wait_service", VERSION_thd_wait, &thd_wait_handler }, { "my_thread_scheduler_service", VERSION_my_thread_scheduler, &my_thread_scheduler_handler }, - { "progress_report_service", VERSION_progress_report, &progress_report_handler } + { "progress_report_service", VERSION_progress_report, &progress_report_handler }, + { "logger_service", VERSION_logger, &logger_handler }, }; |