MySQL 8.0.32
Source Code Documentation
s_mysql_log_sink_perfschema Struct Reference

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...
 

Detailed Description

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.

Member Data Documentation

◆ event_add

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.

Parameters
timestampTimestamp (in microseconds), or 0 to have one generated
thread_idthread_id of the thread that detected the issue
prio(INFORMATION|WARNING|ERROR|SYSTEM)_LEVEL
error_codeMY-123456
error_code_lengthlength in bytes of error_code
subsysSubsystem ("InnoDB", "Server", "Repl")
subsys_lengthlength in bytes of subsys
messagedata field (error message/JSON record/...)
message_lengthlength of data field
Return values
LOG_SERVICE_SUCCESSsuccess
LOG_SERVICE_ARGUMENT_TOO_LONGargument too long
LOG_SERVICE_INVALID_ARGUMENTinvalid argument

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