MySQL  8.0.26
Source Code Documentation
keyring_log_builtins_definition.cc File Reference
#include <time.h>
#include <cstdio>
#include <cstring>
#include <iostream>
#include <locale>
#include <sstream>
#include <m_string.h>
#include <components/keyrings/common/component_helpers/include/keyring_log_builtins_definition.h>

Classes

struct  st_error
 Error structure. More...
 
struct  _log_item_iter
 Iterator over the key/value pairs of a log_line. More...
 
struct  _log_line
 log_line ("log event") More...
 
struct  _log_item_wellknown_key
 Pre-defined "well-known" keys, as opposed to ad hoc ones, for key/value pairs in logging. More...
 

Namespaces

 keyring_common
 
 keyring_common::service_definition
 

Macros

#define LOG_ITEM_MAX   64
 Maximum number of key/value pairs in a log event. More...
 

Typedefs

typedef struct _log_item_iter log_item_iter
 Iterator over the key/value pairs of a log_line. More...
 
typedef struct _log_line log_line
 log_line ("log event") More...
 
typedef struct _log_item_wellknown_key log_item_wellknown_key
 Pre-defined "well-known" keys, as opposed to ad hoc ones, for key/value pairs in logging. More...
 

Functions

static int log_item_wellknown_by_type (log_item_type t)
 Check if we know about the item type. More...
 
static const char * log_label_from_prio (int prio)
 Convenience function: Derive a log label ("error", "warning", "information") from a severity. More...
 

Variables

static st_error global_error_names []
 Error info - generated from error message file. More...
 
static const log_item_wellknown_key log_item_wellknown_keys []
 Required items and their type - See LogComponentErr. More...
 
static uint log_item_wellknown_keys_count
 

Macro Definition Documentation

◆ LOG_ITEM_MAX

#define LOG_ITEM_MAX   64

Maximum number of key/value pairs in a log event.

May be changed or abolished later.

Typedef Documentation

◆ log_item_iter

typedef struct _log_item_iter log_item_iter

Iterator over the key/value pairs of a log_line.

At present, only one iter may exist per log_line.

◆ log_item_wellknown_key

Pre-defined "well-known" keys, as opposed to ad hoc ones, for key/value pairs in logging.

◆ log_line

typedef struct _log_line log_line

log_line ("log event")

Function Documentation

◆ log_item_wellknown_by_type()

static int log_item_wellknown_by_type ( log_item_type  t)
static

Check if we know about the item type.

◆ log_label_from_prio()

static const char* log_label_from_prio ( int  prio)
static

Convenience function: Derive a log label ("error", "warning", "information") from a severity.

Parameters
priothe severity/prio in question
Returns
a label corresponding to that priority.
Return values
Systemfor prio of SYSTEM_LEVEL
Errorfor prio of ERROR_LEVEL
Warningfor prio of WARNING_LEVEL
Notefor prio of INFORMATION_LEVEL

Variable Documentation

◆ global_error_names

st_error global_error_names[]
static
Initial value:
= {
{nullptr, 0, nullptr, nullptr, nullptr, 0}}

Error info - generated from error message file.

◆ log_item_wellknown_keys

const log_item_wellknown_key log_item_wellknown_keys[]
static
Initial value:
= {
@ LOG_ITEM_SRV_COMPONENT
log called from component ...
Definition: log_shared.h:135
@ LOG_ITEM_SRC_FUNC
log called from function ...
Definition: log_shared.h:133
@ LOG_ITEM_SRC_FILE
log called from file ...
Definition: log_shared.h:131
@ LOG_ITEM_LOG_MESSAGE
the message, format string
Definition: log_shared.h:144
@ LOG_ITEM_LOG_PRIO
log priority (error, warn, ...)
Definition: log_shared.h:141
@ LOG_ITEM_SRV_SUBSYS
log called from subsystem ...
Definition: log_shared.h:134
@ LOG_ITEM_SQL_ERRCODE
mysql error code (numeric)
Definition: log_shared.h:126
@ LOG_ITEM_SRC_LINE
log called from line ...
Definition: log_shared.h:132
@ LOG_CSTRING
string (char * + \0; variadic API only)
Definition: log_shared.h:169
@ LOG_INTEGER
integer (long long)
Definition: log_shared.h:170
#define STRING_WITH_LEN(X)
Definition: m_string.h:321

Required items and their type - See LogComponentErr.

◆ log_item_wellknown_keys_count

uint log_item_wellknown_keys_count
static
Initial value:
=
static const log_item_wellknown_key log_item_wellknown_keys[]
Required items and their type - See LogComponentErr.
Definition: keyring_log_builtins_definition.cc:90
Pre-defined "well-known" keys, as opposed to ad hoc ones, for key/value pairs in logging.
Definition: keyring_log_builtins_definition.cc:82