31#ifndef WEBSOCKETPP_LOGGER_SYSLOG_HPP
32#define WEBSOCKETPP_LOGGER_SYSLOG_HPP
45template <
typename concurrency,
typename names>
56 :
basic<concurrency,names>(hint), m_channel_type_hint(hint) {}
65 :
basic<concurrency,names>(channels, hint), m_channel_type_hint(hint) {}
73 write(channel, msg.c_str());
84 ::syslog(syslog_priority(channel),
"[%s] %s",
85 names::channel_name(channel), msg);
92 static int const default_level = LOG_INFO;
99 int syslog_priority(
level channel)
const {
101 return syslog_priority_access(channel);
103 return syslog_priority_error(channel);
112 int syslog_priority_error(
level channel)
const {
127 return default_level;
137 return default_level;
Basic logger that outputs to an ostream.
bool dynamic_test(level channel)
concurrency::scoped_lock_type scoped_lock_type
Basic logger that outputs to syslog.
void write(level channel, char const *msg)
Write a cstring message to the given channel.
void write(level channel, std::string const &msg)
Write a string message to the given channel.
syslog(channel_type_hint::value hint=channel_type_hint::access)
Construct the logger.
basic< concurrency, names > base
#define _WEBSOCKETPP_CONSTEXPR_TOKEN_
uint32_t level
Type of a channel package.
Namespace for the WebSocket++ project.
uint32_t value
Type of a channel type hint value.
static value const access
Access log.
static level const devel
Low level debugging information (warning: very chatty)
static level const library
static level const rerror