31#ifndef MYSQL_HARNESS_LOGGING_INCLUDED
32#define MYSQL_HARNESS_LOGGING_INCLUDED
34#include "harness_export.h"
186 std::chrono::time_point<std::chrono::system_clock>
created;
215#ifndef MYSQL_ROUTER_LOG_DOMAIN
216#define MYSQL_ROUTER_LOG_DOMAIN ""
223static inline void log_system(
const char *fmt, ...)
225static inline
void log_error(const
char *fmt, ...)
227static inline
void log_warning(const
char *fmt, ...)
229static inline
void log_info(const
char *fmt, ...)
231static inline
void log_note(const
char *fmt, ...)
233static inline
void log_debug(const
char *fmt, ...)
244 const char *fmt, va_list ap);
253 const char *fmt, va_list ap);
262 const char *fmt, va_list ap);
271 const char *fmt, va_list ap);
280 const char *fmt, va_list ap);
289 const char *fmt, va_list ap);
298 const char *fmt, va_list ap);
324#define IMPORT_LOG_FUNCTIONS() \
325 using mysql_harness::logging::log_system; \
326 using mysql_harness::logging::log_error; \
327 using mysql_harness::logging::log_warning; \
328 using mysql_harness::logging::log_info; \
329 using mysql_harness::logging::log_note; \
330 using mysql_harness::logging::log_debug; \
331 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:216
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:151
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:296
static void static void log_error(const char *fmt,...) ATTRIBUTE_GCC_FORMAT(printf
Definition: logging.h:251
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:278
const char *const kRawLogLevelName
Log level name used in raw logging mode.
Definition: logging.h:156
static void log_system(const char *fmt,...) ATTRIBUTE_GCC_FORMAT(printf
Definition: logging.h:242
static void static void static void static void log_info(const char *fmt,...) ATTRIBUTE_GCC_FORMAT(printf
Definition: logging.h:269
static void static void static void static void static void static void log_debug(const char *fmt,...) ATTRIBUTE_GCC_FORMAT(printf
Definition: logging.h:287
static void static void static void log_warning(const char *fmt,...) ATTRIBUTE_GCC_FORMAT(printf
Definition: logging.h:260
LogTimestampPrecision
Log timestamp precision values.
Definition: logging.h:161
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:495
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:536
Log record containing information collected by the logging system.
Definition: logging.h:183
stdx::this_process::pid_type process_id
Definition: logging.h:185
LogLevel level
Definition: logging.h:184
std::string message
Definition: logging.h:188
std::string domain
Definition: logging.h:187
std::chrono::time_point< std::chrono::system_clock > created
Definition: logging.h:186