30#include "mysqld_error.h"
37 const char *msg, ...) MY_ATTRIBUTE((
format(printf, 5, 0)));
41 const char *msg, va_list args)
42 MY_ATTRIBUTE((
format(printf, 5, 0))) {
55 template <
typename... Args>
78#define log_diag(msg, ...) \
79 ::hm::Health_Monitor::log()->log_message(LOG_TYPE_DIAG, INFORMATION_LEVEL, \
80 ER_DIAG_LOG_STRING, msg, \
83#define log_info(msg, ...) \
84 ::hm::Health_Monitor::log()->log_message(LOG_TYPE_ERROR, INFORMATION_LEVEL, \
85 ER_HEALTH_INFO, msg, ##__VA_ARGS__)
87#define log_warning(msg, ...) \
88 ::hm::Health_Monitor::log()->log_message( \
89 LOG_TYPE_ERROR, WARNING_LEVEL, ER_HEALTH_WARNING, msg, ##__VA_ARGS__)
91#define log_error(msg, ...) \
92 ::hm::Health_Monitor::log()->log_message( \
93 LOG_TYPE_ERROR, ERROR_LEVEL, ER_HEALTH_ERROR, msg, ##__VA_ARGS__)
95#define log_warn_usage(msgno, ...) \
96 ::hm::Health_Monitor::log()->log_message_lu(WARNING_LEVEL, msgno, \
101 std::string &if_false);
102const std::string
eq{
"="};
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 & type(enum_log_type val)
Set log type.
Definition: log_builtins.h:1081
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
Definition: health_monitor_log.h:34
void log_message(enum_log_type log_type, long long level, long long code, const char *msg,...)
Emits information entry into the system log.
Definition: health_monitor_log.cc:46
Log & operator=(Log &&)=delete
void log_message_va(enum_log_type log_type, long long level, long long code, const char *msg, va_list args)
Definition: health_monitor_log.h:40
void log_message_lu(long long level, long long code, Args... args)
Definition: health_monitor_log.h:57
Log & operator=(const Log &)=delete
Log()
Initialize the globals for the MySQL logging component.
Definition: health_monitor_log.cc:34
enum_log_type
log_type – which log to send data to check vs enum_log_table_type and LOG_FILE/LOG_TABLE/LOG_NONE
Definition: log_shared.h:66
#define LOG_COMPONENT_TAG
Definition: log_sink_test.cc:25
#define LOG_SUBSYSTEM_TAG
Definition: log_sink_test.cc:27
static int log_type
Definition: mi_log.cc:47
#define MY_BASENAME
Definition: my_basename.h:40
Definition: component_command.h:29
std::string true_false(bool value)
Definition: health_monitor_log.cc:66
std::string bool_to_string(bool value, const std::string &if_true, const std::string &if_false)
Boolean to string helper functions.
Definition: health_monitor_log.cc:61
std::string on_off(bool value)
Definition: health_monitor_log.cc:65
const std::string eq
Definition: health_monitor_log.h:102
ValueType value(const std::optional< ValueType > &v)
Definition: gtid.h:83