0
0
Fork 0
mirror of https://github.com/matrix-construct/construct synced 2024-11-29 02:02:38 +01:00

ircd::net: Consistent log message formats.

This commit is contained in:
Jason Volk 2020-03-16 16:51:30 -07:00
parent 4c699e0b6c
commit 56825ddcdc

View file

@ -1503,7 +1503,7 @@ catch(const std::exception &e)
{ {
log::error log::error
{ {
log, "acceptor(%p) join: %s", log, "acceptor(%p) join :%s",
this, this,
e.what() e.what()
}; };
@ -1524,7 +1524,7 @@ catch(const boost::system::system_error &e)
{ {
log::error log::error
{ {
log, "acceptor(%p) interrupt: %s", log, "acceptor(%p) interrupt :%s",
this, this,
string(e) string(e)
}; };
@ -1564,7 +1564,9 @@ catch(const std::exception &e)
{ {
throw panic throw panic
{ {
"%s :%s", loghead(*this), e.what() "%s :%s",
loghead(*this),
e.what()
}; };
} }
@ -1823,7 +1825,7 @@ catch(const std::system_error &e)
assert(bool(sock)); assert(bool(sock));
log::derror log::derror
{ {
log, "%s %s in handshake(): %s", log, "%s %s in handshake() :%s",
loghead(*sock), loghead(*sock),
loghead(*this), loghead(*this),
e.what() e.what()
@ -1837,7 +1839,7 @@ catch(const std::exception &e)
assert(bool(sock)); assert(bool(sock));
log::error log::error
{ {
log, "%s %s in handshake(): %s", log, "%s %s in handshake() :%s",
loghead(*sock), loghead(*sock),
loghead(*this), loghead(*this),
e.what() e.what()
@ -2459,7 +2461,7 @@ catch(const std::exception &e)
{ {
log::error log::error
{ {
log, "acceptor(%p) join: %s", this, e.what() log, "acceptor(%p) join :%s", this, e.what()
}; };
} }
@ -2474,7 +2476,7 @@ catch(const boost::system::system_error &e)
{ {
log::error log::error
{ {
log, "acceptor(%p) interrupt: %s", this, string(e) log, "acceptor(%p) interrupt :%s", this, string(e)
}; };
return false; return false;
@ -2631,7 +2633,7 @@ catch(const std::exception &e)
{ {
log::error log::error
{ {
log, "socket(%p) scope_timeout::cancel: %s", log, "socket(%p) scope_timeout::cancel :%s",
(const void *)s, (const void *)s,
e.what() e.what()
}; };
@ -2758,7 +2760,7 @@ catch(const std::exception &e)
{ {
log::critical log::critical
{ {
log, "socket(%p) close: %s", log, "socket(%p) close :%s",
this, this,
e.what() e.what()
}; };
@ -2928,7 +2930,7 @@ catch(const std::exception &e)
{ {
throw panic throw panic
{ {
"socket:%lu disconnect: type: %d: %s", "socket:%lu disconnect: type: %d :%s",
this->id, this->id,
uint(opts.type), uint(opts.type),
e.what() e.what()
@ -3506,7 +3508,7 @@ catch(const std::exception &e)
{ {
log::critical log::critical
{ {
log, "socket(%p) handle: %s", log, "socket(%p) handle :%s",
this, this,
e.what() e.what()
}; };
@ -3552,7 +3554,9 @@ noexcept try
// All other errors are unexpected, logged and ignored here. // All other errors are unexpected, logged and ignored here.
default: throw panic default: throw panic
{ {
"socket(%p): unexpected: %s\n", (const void *)this, string(ec) "socket(%p): unexpected :%s",
(const void *)this,
string(ec)
}; };
} }
else ec = make_error_code(std::errc::operation_canceled); else ec = make_error_code(std::errc::operation_canceled);
@ -3580,7 +3584,7 @@ catch(const boost::system::system_error &e)
assert(0); assert(0);
log::critical log::critical
{ {
log, "socket(%p) handle timeout: %s", log, "socket(%p) handle timeout :%s",
(const void *)this, (const void *)this,
string(e) string(e)
}; };
@ -3596,7 +3600,7 @@ catch(const std::exception &e)
{ {
log::critical log::critical
{ {
log, "socket(%p) handle timeout: %s", log, "socket(%p) handle timeout :%s",
(const void *)this, (const void *)this,
e.what() e.what()
}; };
@ -3666,7 +3670,7 @@ catch(const std::exception &e)
{ {
log::critical log::critical
{ {
log, "socket(%p) handle_connect: %s", log, "socket(%p) handle_connect :%s",
this, this,
e.what() e.what()
}; };
@ -3709,7 +3713,7 @@ catch(const boost::system::system_error &e)
{ {
log::error log::error
{ {
log, "socket(%p) disconnect: %s", log, "socket(%p) disconnect :%s",
this, this,
e.what() e.what()
}; };
@ -3721,7 +3725,7 @@ catch(const std::exception &e)
{ {
log::critical log::critical
{ {
log, "socket(%p) disconnect: %s", log, "socket(%p) disconnect :%s",
this, this,
e.what() e.what()
}; };
@ -3778,7 +3782,7 @@ catch(const boost::system::system_error &e)
{ {
log::error log::error
{ {
log, "socket(%p) after handshake: %s", log, "socket(%p) after handshake :%s",
this, this,
e.what() e.what()
}; };
@ -3800,7 +3804,7 @@ catch(const std::exception &e)
{ {
log::critical log::critical
{ {
log, "socket(%p) handle_handshake: %s", log, "socket(%p) handle_handshake :%s",
this, this,
e.what() e.what()
}; };
@ -3850,7 +3854,7 @@ noexcept try
const critical_assertion ca; const critical_assertion ca;
log::warning log::warning
{ {
log, "verify[%s]: %s :%s", log, "verify[%s] :%s :%s",
common_name(opts), common_name(opts),
openssl::get_error_string(stctx), openssl::get_error_string(stctx),
openssl::print_subject(buf, cert) openssl::print_subject(buf, cert)
@ -3935,7 +3939,7 @@ noexcept try
const critical_assertion ca; const critical_assertion ca;
log::debug log::debug
{ {
log, "verify[%s]: %s", log, "verify[%s] %s",
common_name(opts), common_name(opts),
openssl::print_subject(buf, cert) openssl::print_subject(buf, cert)
}; };
@ -3947,7 +3951,7 @@ catch(const inauthentic &e)
{ {
log::error log::error
{ {
log, "Certificate rejected: %s", e.what() log, "Certificate rejected :%s", e.what()
}; };
return false; return false;
@ -3956,7 +3960,7 @@ catch(const std::exception &e)
{ {
log::critical log::critical
{ {
log, "Certificate error: %s", e.what() log, "Certificate error :%s", e.what()
}; };
return false; return false;
@ -3973,7 +3977,7 @@ catch(const std::exception &e)
{ {
log::critical log::critical
{ {
log, "socket(%p) async handler: unhandled exception: %s", log, "socket(%p) async handler: unhandled exception :%s",
this, this,
e.what() e.what()
}; };
@ -3995,7 +3999,7 @@ catch(const std::exception &e)
{ {
log::critical log::critical
{ {
log, "socket(%p) async handler: unhandled exception: %s", log, "socket(%p) async handler: unhandled exception :%s",
this, this,
e.what() e.what()
}; };