26#ifndef TELEMETRY_LOG_H_INCLUDED
27#define TELEMETRY_LOG_H_INCLUDED
30#include <mysqld_error.h>
41 static void log_message(
const char *src_file,
int src_line,
long long level,
42 long long code,
const char *msg, ...)
43 MY_ATTRIBUTE((
format(printf, 5, 0)));
46 long long level,
long long code,
const char *msg,
48 MY_ATTRIBUTE((
format(printf, 5, 0))) {
61 template <
typename... Args>
63 long long level,
long long code, Args... args) {
79#define log_info(msg, ...) \
80 Log::log_message(__FILE__, __LINE__, INFORMATION_LEVEL, ER_TELEMETRY_INFO, \
83#define log_warning(msg, ...) \
84 Log::log_message(__FILE__, __LINE__, WARNING_LEVEL, ER_TELEMETRY_WARNING, \
87#define log_error(msg, ...) \
88 Log::log_message(__FILE__, __LINE__, ERROR_LEVEL, ER_TELEMETRY_ERROR, msg, \
91#define log_warn_usage(msgno, ...) \
92 Log::log_message_lu(__FILE__, __LINE__, WARNING_LEVEL, msgno, ##__VA_ARGS__)
Modular logger: fluid API.
Definition: log_builtins.h:924
LogEvent & prio(longlong val)
Set error message priority.
Definition: log_builtins.h:1316
LogEvent & subsys(const char *val)
Which subsystem in the source was the problem detected in? ("Repl"/"InnoDB"/"Server")
Definition: log_builtins.h:1191
LogEvent & errcode(longlong val)
Append a numeric error code.
Definition: log_builtins.h:1093
LogEvent & source_file(const char *val)
Which source file was the problem detected in?
Definition: log_builtins.h:1154
LogEvent & component(const char *val)
Which component in the source was the problem detected in? This should be the same string that is giv...
Definition: log_builtins.h:1206
LogEvent & function(const char *val)
Which function in the source was the problem detected in?
Definition: log_builtins.h:1178
LogEvent & source_line(longlong val)
Which line in the source file was the problem detected on?
Definition: log_builtins.h:1166
LogEvent & messagev(const char *fmt, va_list ap)
Fill in a format string by substituting the % with the given arguments, then add the result as the ev...
Definition: log_builtins.h:1376
LogEvent & lookup(longlong errcode,...)
Find an error message by its MySQL error code.
Definition: log_builtins.h:1451
LogEvent & no_telemetry()
Mark log line to skip being additionally emitted as a telemetry log record.
Definition: log_builtins.h:1563
static void log_message(const char *src_file, int src_line, long long level, long long code, const char *msg,...)
Definition: tm_log.cc:43
static void log_message_lu(const char *src_file, int src_line, long long level, long long code, Args... args)
Definition: tm_log.h:62
static void log_message_va(const char *src_file, int src_line, long long level, long long code, const char *msg, va_list args)
Definition: tm_log.h:45
static void init(const mysql_service_log_builtins_t *log_bi_srv, const mysql_service_log_builtins_string_t *log_bs_srv)
Definition: tm_log.cc:37
#define LOG_COMPONENT_TAG
Definition: log_sink_test.cc:25
#define LOG_SUBSYSTEM_TAG
Definition: log_sink_test.cc:27
Definition: option_usage.cc:40
const char * component_name
Definition: tm_component.cc:97
#define SERVICE_TYPE(name)
Generates the standard Service type name.
Definition: service.h:76