Back to C++20 standard!
Logging is worked (AdcOstreamLogger and AdcSPDLOGLogger classes)
This commit is contained in:
@@ -296,6 +296,15 @@ public:
|
||||
_acceptor.close(ec);
|
||||
}
|
||||
|
||||
|
||||
std::string localEndpoint() const
|
||||
{
|
||||
std::stringstream st;
|
||||
st << _acceptor.local_endpoint();
|
||||
|
||||
return st.str();
|
||||
}
|
||||
|
||||
private:
|
||||
asio::io_context& _ioContext;
|
||||
srv_acceptor_t _acceptor;
|
||||
@@ -758,11 +767,17 @@ public:
|
||||
}
|
||||
|
||||
|
||||
// static void formatError(std::error_code err, std::string& result_str)
|
||||
// {
|
||||
// std::format_to(std::back_inserter(result_str), "{} (Err category: {}) (Err msg: {})", err.value(),
|
||||
// err.category().name(), err.message());
|
||||
// }
|
||||
std::string remoteEndpoint() const
|
||||
{
|
||||
std::stringstream st;
|
||||
st << _socket.remote_endpoint();
|
||||
|
||||
if (st.str().empty()) {
|
||||
return "<local>";
|
||||
}
|
||||
|
||||
return st.str();
|
||||
}
|
||||
|
||||
static std::string formattableError(std::error_code ec)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user