MySQL 8.0.40
Source Code Documentation
|
This defines functions to let logging services add error log events to performance_schema.error_log. More...
#include <log_sink_perfschema.h>
Public Attributes | |
log_service_error(* | event_add )(ulonglong timestamp, ulonglong thread_id, ulong prio, const char *error_code, uint error_code_length, const char *subsys, uint subsys_length, const char *message, uint message_length) |
Add a log-event to the ring buffer. More... | |
This defines functions to let logging services add error log events to performance_schema.error_log.
For documentation of the individual functions, see log_sink_perfschema.cc Primitives for logging services to add to performance_schema.error_log.
log_service_error(* s_mysql_log_sink_perfschema::event_add) (ulonglong timestamp, ulonglong thread_id, ulong prio, const char *error_code, uint error_code_length, const char *subsys, uint subsys_length, const char *message, uint message_length) |
Add a log-event to the ring buffer.
We require the various pieces of information to be passed individually rather than accepting a log_sink_pfs_event so we can sanity check each part individually and don't have to worry about different components using different versions/sizes of the struct.
We copy the data as needed, so caller may free their copy once this call returns.
timestamp | Timestamp (in microseconds), or 0 to have one generated |
thread_id | thread_id of the thread that detected the issue |
prio | (INFORMATION|WARNING|ERROR|SYSTEM)_LEVEL |
error_code | MY-123456 |
error_code_length | length in bytes of error_code |
subsys | Subsystem ("InnoDB", "Server", "Repl") |
subsys_length | length in bytes of subsys |
message | data field (error message/JSON record/...) |
message_length | length of data field |
LOG_SERVICE_SUCCESS | success |
LOG_SERVICE_ARGUMENT_TOO_LONG | argument too long |
LOG_SERVICE_INVALID_ARGUMENT | invalid argument |