...one of the most highly
regarded and expertly designed C++ library projects in the
world.
— Herb Sutter and Andrei
Alexandrescu, C++
Coding Standards
Logger class. More...
#include <boost/redis/logger.hpp>
Public Types | |
enum class | level |
Syslog-like log levels. More... | |
Public Member Functions | |
logger (level l=level::disabled) | |
Constructor. More... | |
void | on_connect (system::error_code const &ec, asio::ip::tcp::endpoint const &ep) |
Called when the connect operation completes. More... | |
void | on_connection_lost (system::error_code const &ec) |
Called when the connection is lost. More... | |
void | on_hello (system::error_code const &ec, generic_response const &resp) |
Called when the HELLO request completes. More... | |
void | on_read (system::error_code const &ec, std::size_t n) |
Called when the read operation completes. More... | |
void | on_resolve (system::error_code const &ec, asio::ip::tcp::resolver::results_type const &res) |
Called when the resolve operation completes. More... | |
void | on_run (system::error_code const &reader_ec, system::error_code const &writer_ec) |
Called when the run operation completes. More... | |
void | on_runner (system::error_code const &run_all_ec, system::error_code const &health_check_ec, system::error_code const &hello_ec) |
Called when the runner operation completes. More... | |
void | on_ssl_handshake (system::error_code const &ec) |
Called when the ssl handshake operation completes. More... | |
void | on_write (system::error_code const &ec, std::string const &payload) |
Called when the write operation completes. More... | |
void | set_prefix (std::string_view prefix) |
Sets a prefix to every log message. More... | |
Logger class.
The class can be passed to the connection objects to log to std::clog
Notice that currently this class has no stable interface. Users that don't want any logging can disable it by contructing a logger with logger::level::emerg to the connection.
Definition at line 27 of file logger.hpp.