26#ifndef MYSQL_HARNESS_LOGGER_LOGGER_INCLUDED
27#define MYSQL_HARNESS_LOGGER_LOGGER_INCLUDED
29#include "harness_export.h"
57 void attach_handler(std::string
name);
58 void detach_handler(std::string
name,
bool handler_must_exist =
true);
61 void lazy_handle(
LogLevel record_level,
62 std::function<
Record()> record_creator)
const;
76 bool is_handled(
LogLevel level)
const;
82 precision_ = precision;
100 void debug(std::invocable
auto producer)
const {
105 void info(std::invocable
auto producer)
const {
110 void warning(std::invocable
auto producer)
const {
115 void system(std::invocable
auto producer)
const {
120 void note(std::invocable
auto producer)
const {
125 void error(std::invocable
auto producer)
const {
135 bool init_logger()
const;
137 mutable std::optional<mysql_harness::logging::Logger>
logger_;
void debug(const std::string &msg) const
Definition: logger.h:103
void warning(std::invocable auto producer) const
Definition: logger.h:110
DomainLogger(std::string domain)
Definition: logger.h:98
void info(const std::string &msg) const
Definition: logger.h:108
void info(std::invocable auto producer) const
Definition: logger.h:105
void note(const std::string &msg) const
Definition: logger.h:123
void system(std::invocable auto producer) const
Definition: logger.h:115
void note(std::invocable auto producer) const
Definition: logger.h:120
void system(const std::string &msg) const
Definition: logger.h:118
void debug(std::invocable auto producer) const
Definition: logger.h:100
void warning(const std::string &msg) const
Definition: logger.h:113
void error(const std::string &msg) const
Definition: logger.h:128
std::optional< mysql_harness::logging::Logger > logger_
Definition: logger.h:137
void error(std::invocable auto producer) const
Definition: logger.h:125
Logger class.
Definition: logger.h:49
const Registry * registry_
Definition: logger.h:90
std::set< std::string > handlers_
Definition: logger.h:89
LogLevel get_level() const
Definition: logger.h:80
LogLevel level_
Definition: logger.h:87
void set_level(LogLevel level)
Definition: logger.h:79
const std::set< std::string > & get_handler_names() const
Definition: logger.h:77
Logger()
Definition: logger.h:55
LogTimestampPrecision precision_
Definition: logger.h:88
LogTimestampPrecision get_timestamp_precision() const
Definition: logger.h:84
void set_timestamp_precision(LogTimestampPrecision precision)
Definition: logger.h:81
Definition: registry.h:47
Logging interface for using and extending the logging subsystem.
#define MYSQL_ROUTER_LOG_DOMAIN
Log message for the domain.
Definition: logging.h:215
static int record
Definition: mysqltest.cc:193
static loglevel log_level(const Sql_condition *condition)
Definition: histogram.cc:1644
const LogLevel kDefaultLogLevel
Default log level used by the router.
Definition: logging.h:140
LogLevel
Log level values.
Definition: logging.h:90
@ kInfo
Informational message.
@ kWarning
Warning message.
@ kNote
Note level contains additional information over the normal informational messages.
LogTimestampPrecision
Log timestamp precision values.
Definition: logging.h:160
static int handle(int sql_errno, const char *sqlstate, const char *message, void *state)
Bridge function between the C++ API offered by this module and the C API of the parser service.
Definition: services.cc:64
Definition: gcs_xcom_synode.h:64
case opt name
Definition: sslopt-case.h:29
Log record containing information collected by the logging system.
Definition: logging.h:182