26#ifndef MYSQL_HARNESS_SYSLOG_PLUGIN_INCLUDED 
   27#define MYSQL_HARNESS_SYSLOG_PLUGIN_INCLUDED 
   31#include "mysql/harness/plugin.h" 
   58  void open(
const std::string &ident) 
noexcept {
 
   61    openlog(
ident_, LOG_CONS | LOG_NDELAY, LOG_DAEMON);
 
   64  void close() const noexcept { closelog(); }
 
   67  void reopen(
const std::string )
 override {}
 
   76      case LogLevel::kFatal:
 
   78      case LogLevel::kError:
 
   80      case LogLevel::kWarning:
 
   84      case LogLevel::kSystem:
 
   88        assert(level == LogLevel::kDebug);
 
Unix-based systems specific logging handler(sink) that writes the logs to the syslog.
Definition: syslog_plugin.h:49
 
SyslogHandler(bool format_messages=true, LogLevel level=LogLevel::kNotSet)
Definition: syslog_plugin.h:53
 
static constexpr unsigned kMaxIdentSize
Definition: syslog_plugin.h:51
 
void open(const std::string &ident) noexcept
Definition: syslog_plugin.h:58
 
void close() const noexcept
Definition: syslog_plugin.h:64
 
static int log_level_to_syslog(const LogLevel level) noexcept
Definition: syslog_plugin.h:74
 
~SyslogHandler() override
Definition: syslog_plugin.h:56
 
char ident_[kMaxIdentSize]
Definition: syslog_plugin.h:93
 
void reopen(const std::string) override
Request to reopen underlying log sink.
Definition: syslog_plugin.h:67
 
void do_log(const mysql_harness::logging::Record &record) noexcept override
Log message handler primitive.
Definition: syslog_plugin.h:70
 
Base class for log message handler.
Definition: handler.h:50
 
Logging interface for using and extending the logging subsystem.
 
static int record
Definition: mysqltest.cc:195
 
LogLevel
Log level values.
Definition: logging.h:90
 
LogTimestampPrecision
Log timestamp precision values.
Definition: logging.h:160
 
Log record containing information collected by the logging system.
Definition: logging.h:182
 
mysql_harness::Plugin harness_plugin_syslog
Definition: syslog_plugin.cc:33
 
constexpr const char * kSyslogPluginName
Definition: syslog_plugin.h:37