46#ifndef LOG_SINK_PERFSCHEMA_H
47#define LOG_SINK_PERFSCHEMA_H
53#define LOG_SINK_PFS_ERROR_CODE_LENGTH 10
56#define LOG_SINK_PFS_SUBSYS_LENGTH 7
170 const char *blob_src);
enum enum_log_service_error log_service_error
Error codes.
unsigned long long int ulonglong
Definition: my_inttypes.h:55
log_service_error log_sink_pfs_event_add(log_sink_pfs_event *e, const char *blob_src)
Add a log-event to the ring buffer.
Definition: log_sink_perfschema.cc:383
ulonglong log_sink_pfs_latest_timestamp
timestamp of most recent write
Definition: log_sink_perfschema.cc:84
log_service_error log_error_read_log(const char *log_name)
Restore error log messages from previous shutdown.
Definition: log_sink_perfschema.cc:686
ulong log_sink_pfs_buffered_bytes
bytes in use (now)
Definition: log_sink_perfschema.cc:80
int log_error_read_log_init()
Set up ring-buffer for error-log.
Definition: log_sink_perfschema.cc:775
ulong log_sink_pfs_expired_events
number of expired entries (ever)
Definition: log_sink_perfschema.cc:82
void log_sink_pfs_read_end()
Release read-lock on ring-buffer.
Definition: log_sink_perfschema.cc:142
#define LOG_SINK_PFS_SUBSYS_LENGTH
Definition: log_sink_perfschema.h:56
int log_error_read_log_exit()
Release error log ring-buffer.
Definition: log_sink_perfschema.cc:749
log_sink_pfs_event * log_sink_pfs_event_first()
Get oldest event still in ring-buffer.
Definition: log_sink_perfschema.cc:159
void log_sink_pfs_read_start()
Acquire a read-lock on the ring-buffer.
Definition: log_sink_perfschema.cc:135
size_t log_sink_pfs_event_count()
Get number of events currently in ring-buffer.
Definition: log_sink_perfschema.cc:150
ulong log_sink_pfs_longest_event
longest event seen (ever)
Definition: log_sink_perfschema.cc:83
struct _log_sink_pfs_event log_sink_pfs_event
log_sink_pfs_event * log_sink_pfs_event_valid(log_sink_pfs_event *e, ulonglong logged)
Use timestamp to check whether a given event-pointer still points to a valid event in the ring-buffer...
Definition: log_sink_perfschema.cc:234
ulong log_sink_pfs_buffered_events
events in buffer (now)
Definition: log_sink_perfschema.cc:81
int log_sink_perfschema(void *instance, log_line *ll)
services: log sinks: logging to performance_schema ring-buffer
Definition: log_sink_perfschema.cc:813
log_sink_pfs_event * log_sink_pfs_event_next(log_sink_pfs_event *e)
Get event following the supplied one.
Definition: log_sink_perfschema.cc:183
#define LOG_SINK_PFS_ERROR_CODE_LENGTH
Definition: log_sink_perfschema.h:53
log_line ("log event")
Definition: keyring_log_builtins_definition.cc:71
Definition: log_sink_perfschema.h:58
ulonglong m_thread_id
Column ERROR_LOG_THREAD.
Definition: log_sink_perfschema.h:63
char m_error_code[LOG_SINK_PFS_ERROR_CODE_LENGTH]
Column ERROR_LOG_ERROR_CODE.
Definition: log_sink_perfschema.h:69
uint m_message_length
Column ERROR_LOG_MESSAGE.
Definition: log_sink_perfschema.h:77
ulonglong m_timestamp
Column ERROR_LOG_TIMESTAMP.
Definition: log_sink_perfschema.h:60
uint m_subsys_length
Definition: log_sink_perfschema.h:74
char m_subsys[LOG_SINK_PFS_SUBSYS_LENGTH]
Column ERROR_LOG_SUBSYS.
Definition: log_sink_perfschema.h:73
ulong m_prio
Column ERROR_LOG_PRIO.
Definition: log_sink_perfschema.h:66
uint m_error_code_length
Definition: log_sink_perfschema.h:70