![]()  | 
  
    MySQL 8.0.44
    
   Source Code Documentation 
   | 
 
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... | |
Primitives for logging services to add to performance_schema.error_log.
      
  | 
  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.
| 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"-style error-code, or nullptr | 
| error_code_length | length in bytes of error_code | 
| subsys | Subsystem ("InnoDB", "Server", "Repl"), or nullptr | 
| subsys_length | length in bytes of subsys | 
| message | data (error message/JSON record/...). required. | 
| message_length | length of data field | 
| LOG_SERVICE_SUCCESS | success | 
| LOG_SERVICE_ARGUMENT_TOO_LONG | argument too long | 
| LOG_SERVICE_INVALID_ARGUMENT | invalid argument |