7#ifndef BOOST_REDIS_LOGGER_HPP
8#define BOOST_REDIS_LOGGER_HPP
10#include <boost/redis/response.hpp>
11#include <boost/asio/ip/tcp.hpp>
14namespace boost::system {
class error_code;}
16namespace boost::redis {
77 void on_resolve(system::error_code
const& ec, asio::ip::tcp::resolver::results_type
const& res);
85 void on_connect(system::error_code
const& ec, asio::ip::tcp::endpoint
const& ep);
107 void on_write(system::error_code
const& ec, std::string
const& payload);
115 void on_read(system::error_code
const& ec, std::size_t n);
123 void on_run(system::error_code
const& reader_ec, system::error_code
const& writer_ec);
152 system::error_code
const& run_all_ec,
153 system::error_code
const& health_check_ec,
154 system::error_code
const& hello_ec);
158 system::error_code
const& ping_ec,
159 system::error_code
const& check_timeout_ec);
161 void trace(std::string_view reason);
166 std::string_view prefix_;
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.
void on_run(system::error_code const &reader_ec, system::error_code const &writer_ec)
Called when the run operation completes.
void set_prefix(std::string_view prefix)
Sets a prefix to every log message.
level
Syslog-like log levels.
adapter::result< std::vector< resp3::node > > generic_response
A generic response to a request.
void on_resolve(system::error_code const &ec, asio::ip::tcp::resolver::results_type const &res)
Called when the resolve operation completes.
void on_ssl_handshake(system::error_code const &ec)
Called when the ssl handshake operation completes.
void on_connect(system::error_code const &ec, asio::ip::tcp::endpoint const &ep)
Called when the connect operation completes.
void on_write(system::error_code const &ec, std::string const &payload)
Called when the write operation completes.
logger(level l=level::disabled)
Constructor.
void on_hello(system::error_code const &ec, generic_response const &resp)
Called when the HELLO request completes.
void on_read(system::error_code const &ec, std::size_t n)
Called when the read operation completes.
void on_connection_lost(system::error_code const &ec)
Called when the connection is lost.