mirror of
https://github.com/MariaDB/server.git
synced 2025-07-29 05:21:33 +03:00
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
This commit is contained in:
@ -80,6 +80,24 @@ void thd_progress_next_stage(void* thd);
|
||||
void thd_progress_end(void* thd);
|
||||
const char *set_thd_proc_info(void*, const char * info, const char *func,
|
||||
const char *file, unsigned int line);
|
||||
#include <mysql/service_logger.h>
|
||||
typedef struct logger_handle_st LOGGER_HANDLE;
|
||||
extern struct logger_service_st {
|
||||
LOGGER_HANDLE* (*open)(const char *path,
|
||||
unsigned long size_limit,
|
||||
unsigned int rotations);
|
||||
int (*close)(LOGGER_HANDLE *log);
|
||||
int (*vprintf)(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
||||
int (*printf)(LOGGER_HANDLE *log, const char *fmt, ...);
|
||||
int (*rotate)(LOGGER_HANDLE *log);
|
||||
} *logger_service;
|
||||
LOGGER_HANDLE *logger_open(const char *path,
|
||||
unsigned long size_limit,
|
||||
unsigned int rotations);
|
||||
int logger_close(LOGGER_HANDLE *log);
|
||||
int logger_vprintf(LOGGER_HANDLE *log, const char *fmt, va_list argptr);
|
||||
int logger_rotate(LOGGER_HANDLE *log);
|
||||
int logger_printf(LOGGER_HANDLE *log, const char *fmt, ...);
|
||||
struct st_mysql_xid {
|
||||
long formatID;
|
||||
long gtrid_length;
|
||||
|
Reference in New Issue
Block a user