5 #include <asio/ip/address.hpp> 6 #include <websocketpp/logger/levels.hpp> 12 using LogCallback = std::function<void(WebSocketLogLevel, char const*)>;
16 return "[" + addr.to_string() +
"]";
18 return addr.to_string();
34 channel_type_hint::value hint = channel_type_hint::access)
57 void write(websocketpp::log::level channel, std::string
const& msg) {
58 write(channel, msg.c_str());
61 void write(websocketpp::log::level channel,
char const* msg) {
69 if (channel == websocketpp::log::elevel::devel) {
71 }
else if (channel == websocketpp::log::elevel::library) {
73 }
else if (channel == websocketpp::log::elevel::info) {
75 }
else if (channel == websocketpp::log::elevel::warn) {
77 }
else if (channel == websocketpp::log::elevel::rerror) {
79 }
else if (channel == websocketpp::log::elevel::fatal) {
85 constexpr
bool static_test(websocketpp::log::level channel)
const {
constexpr bool static_test(websocketpp::log::level channel) const
void write(websocketpp::log::level channel, char const *msg)
void set_callback(LogCallback callback)
void NoOpLogCallback(WebSocketLogLevel, char const *)
void clear_channels(websocketpp::log::level channels)
void write(websocketpp::log::level channel, std::string const &msg)
void set_channels(websocketpp::log::level channels)
std::function< void(WebSocketLogLevel, char const *)> LogCallback
CallbackLogger(websocketpp::log::level channels, channel_type_hint::value hint=channel_type_hint::access)
CallbackLogger(channel_type_hint::value hint=channel_type_hint::access)
websocketpp::log::level const _staticChannels
websocketpp::log::channel_type_hint channel_type_hint
channel_type_hint::value _channelTypeHint
std::string IPAddressToString(const asio::ip::address &addr)
bool dynamic_test(websocketpp::log::level channel)
websocketpp::log::level _dynamicChannels