31#ifndef MYSQL_HARNESS_LOGGING_INCLUDED
32#define MYSQL_HARNESS_LOGGING_INCLUDED
34#include "harness_export.h"
191 std::chrono::time_point<std::chrono::system_clock>
created;
220#ifndef MYSQL_ROUTER_LOG_DOMAIN
221#define MYSQL_ROUTER_LOG_DOMAIN ""
228static inline void log_system(
const char *fmt, ...)
230static inline
void log_error(const
char *fmt, ...)
232static inline
void log_warning(const
char *fmt, ...)
234static inline
void log_info(const
char *fmt, ...)
236static inline
void log_note(const
char *fmt, ...)
238static inline
void log_debug(const
char *fmt, ...)
249 const char *fmt, va_list ap);
258 const char *fmt, va_list ap);
267 const char *fmt, va_list ap);
276 const char *fmt, va_list ap);
285 const char *fmt, va_list ap);
294 const char *fmt, va_list ap);
303 const char *fmt, va_list ap);
329#define IMPORT_LOG_FUNCTIONS() \
330 using mysql_harness::logging::log_system; \
331 using mysql_harness::logging::log_error; \
332 using mysql_harness::logging::log_warning; \
333 using mysql_harness::logging::log_info; \
334 using mysql_harness::logging::log_note; \
335 using mysql_harness::logging::log_debug; \
336 using mysql_harness::logging::log_custom;
#define ATTRIBUTE_GCC_FORMAT(style, fmt_pos, arg_pos)
Definition: compiler_attributes.h:33
#define MYSQL_ROUTER_LOG_DOMAIN
Log message for the domain.
Definition: logging.h:221
static loglevel log_level(const Sql_condition *condition)
Definition: histogram.cc:1643
const size_t kLogMessageMaxSize
Max message length that can be logged; if message is longer, it will be truncated to this length.
Definition: logging.h:54
constexpr char kConfigOptionLogLevel[]
Definition: logging.h:72
const char *const kDefaultLogLevelName
Log level name for the default log level used by the router.
Definition: logging.h:156
constexpr char kDefaultLogFilename[]
Default log filename.
Definition: logging.h:89
constexpr char kConfigOptionLogTimestampPrecision[]
Definition: logging.h:73
constexpr char kSqlLogger[]
Definition: logging.h:85
const LogLevel kDefaultLogLevel
Default log level used by the router.
Definition: logging.h:146
LogLevel
Log level values.
Definition: logging.h:96
@ kInfo
Informational message.
@ kWarning
Warning message.
@ kNote
Note level contains additional information over the normal informational messages.
constexpr char kMainLogger[]
Special names reserved for "main" program logger.
Definition: logging.h:81
constexpr char kNone[]
Definition: logging.h:76
static void static void static void static void static void static void static void log_custom(const LogLevel log_level, const char *fmt,...) ATTRIBUTE_GCC_FORMAT(printf
Definition: logging.h:301
static void static void log_error(const char *fmt,...) ATTRIBUTE_GCC_FORMAT(printf
Definition: logging.h:256
constexpr char kMainConsoleHandler[]
Definition: logging.h:83
constexpr char kConfigOptionLogFilename[]
Section name and option name used in config file (and later in configuration object) to specify log l...
Definition: logging.h:70
static void static void static void static void static void log_note(const char *fmt,...) ATTRIBUTE_GCC_FORMAT(printf
Definition: logging.h:283
const char *const kRawLogLevelName
Log level name used in raw logging mode.
Definition: logging.h:161
static void log_system(const char *fmt,...) ATTRIBUTE_GCC_FORMAT(printf
Definition: logging.h:247
static void static void static void static void log_info(const char *fmt,...) ATTRIBUTE_GCC_FORMAT(printf
Definition: logging.h:274
static void static void static void static void static void static void log_debug(const char *fmt,...) ATTRIBUTE_GCC_FORMAT(printf
Definition: logging.h:292
const LogLevel kDefaultLogLevelBootstrap
Default log level written by the router to the config file on bootstrap.
Definition: logging.h:151
static void static void static void log_warning(const char *fmt,...) ATTRIBUTE_GCC_FORMAT(printf
Definition: logging.h:265
LogTimestampPrecision
Log timestamp precision values.
Definition: logging.h:166
constexpr char kMainLogHandler[]
Definition: logging.h:82
constexpr char kConfigSectionLogger[]
Definition: logging.h:74
constexpr char kConfigOptionLogDestination[]
Definition: logging.h:71
HARNESS_EXPORT bool log_level_is_handled(LogLevel level, const char *domain)
Definition: registry.cc:509
pid_t pid_type
Definition: process.h:45
void HARNESS_EXPORT log_message(LogLevel level, const char *module, const char *fmt, va_list ap)
Definition: registry.cc:550
Log record containing information collected by the logging system.
Definition: logging.h:188
stdx::this_process::pid_type process_id
Definition: logging.h:190
LogLevel level
Definition: logging.h:189
std::string message
Definition: logging.h:193
std::string domain
Definition: logging.h:192
std::chrono::time_point< std::chrono::system_clock > created
Definition: logging.h:191