MySQL 8.3.0
Source Code Documentation
log_sink_perfschema_imp Class Reference

Primitives for logging services to add to performance_schema.error_log. More...

#include <log_sink_perfschema_imp.h>

Static Public Member Functions

static 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) noexcept
 Add a log-event to the ring buffer. More...
 

Detailed Description

Primitives for logging services to add to performance_schema.error_log.

Member Function Documentation

◆ event_add()

log_service_error log_sink_perfschema_imp::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 
)
staticnoexcept

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_code"MY-123456"-style error-code, or nullptr
error_code_lengthlength in bytes of error_code
subsysSubsystem ("InnoDB", "Server", "Repl"), or nullptr
subsys_lengthlength in bytes of subsys
messagedata (error message/JSON record/...). required.
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 class was generated from the following files: