26#ifndef MYSQL_HARNESS_SYSLOG_PLUGIN_INCLUDED 
   27#define MYSQL_HARNESS_SYSLOG_PLUGIN_INCLUDED 
   31#include "mysql/harness/plugin.h" 
   57  void open(
const std::string &ident) 
noexcept {
 
   60    openlog(
ident_, LOG_CONS | LOG_NDELAY, LOG_DAEMON);
 
   63  void close() const noexcept { closelog(); }
 
   66  void reopen(
const std::string )
 override {}
 
   75      case LogLevel::kFatal:
 
   77      case LogLevel::kError:
 
   79      case LogLevel::kWarning:
 
   83      case LogLevel::kSystem:
 
   87        assert(level == LogLevel::kDebug);
 
Unix-based systems specific logging handler(sink) that writes the logs to the syslog.
Definition: syslog_plugin.h:48
 
SyslogHandler(bool format_messages=true, LogLevel level=LogLevel::kNotSet)
Definition: syslog_plugin.h:52
 
static constexpr unsigned kMaxIdentSize
Definition: syslog_plugin.h:50
 
void open(const std::string &ident) noexcept
Definition: syslog_plugin.h:57
 
void close() const noexcept
Definition: syslog_plugin.h:63
 
static int log_level_to_syslog(const LogLevel level) noexcept
Definition: syslog_plugin.h:73
 
~SyslogHandler() override
Definition: syslog_plugin.h:55
 
char ident_[kMaxIdentSize]
Definition: syslog_plugin.h:92
 
void reopen(const std::string) override
Request to reopen underlying log sink.
Definition: syslog_plugin.h:66
 
void do_log(const mysql_harness::logging::Record &record) noexcept override
Log message handler primitive.
Definition: syslog_plugin.h:69
 
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:188
 
LogLevel
Log level values.
Definition: logging.h:96
 
LogTimestampPrecision
Log timestamp precision values.
Definition: logging.h:161
 
Log record containing information collected by the logging system.
Definition: logging.h:183
 
mysql_harness::Plugin harness_plugin_syslog
Definition: syslog_plugin.cc:33
 
constexpr const char * kSyslogPluginName
Definition: syslog_plugin.h:36