From 275f35064948e3ce908bfabd2a14f20de047939f Mon Sep 17 00:00:00 2001 From: Jason Volk Date: Mon, 16 Mar 2020 17:58:26 -0700 Subject: [PATCH] ircd::client: Allow some DERROR messages to compile in release mode; tweak facilities. --- ircd/client.cc | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/ircd/client.cc b/ircd/client.cc index e67dbdb32..c42e8ca50 100644 --- a/ircd/client.cc +++ b/ircd/client.cc @@ -836,9 +836,10 @@ catch(const std::system_error &e) } catch(const http::error &e) { - log::derror + log::logf { - resource::log, "%s HTTP %u %s :%s", + log, log::level::DERROR, + "%s HTTP %u %s :%s", loghead(), uint(e.code), http::status(e.code), @@ -897,10 +898,12 @@ catch(const std::system_error &) catch(const http::error &e) { const ctx::exception_handler eh; + if(!empty(e.content)) - log::derror + log::logf { - log, "%s HTTP %u `%s' %s :%s", + resource::log, log::level::DERROR, + "%s HTTP %u `%s' %s :%s", loghead(), uint(e.code), head.uri, @@ -943,7 +946,7 @@ catch(const std::exception &e) log::error { - log, "%s HTTP 500 Internal Error `%s' :%s", + resource::log, "%s HTTP 500 Internal Error `%s' :%s", loghead(), head.uri, e.what()