1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 06:47:35 +00:00

LibHTTP: Move more happy-path logging behind CHTTPJOB_DEBUG

This commit is contained in:
Nico Weber 2022-01-21 20:09:10 -05:00 committed by Linus Groh
parent 46ffc98ebc
commit a9c80ba33c

View file

@ -24,13 +24,13 @@ void HttpJob::start(NonnullRefPtr<Core::Socket> socket)
}; };
m_socket->set_idle(false); m_socket->set_idle(false);
if (m_socket->is_connected()) { if (m_socket->is_connected()) {
dbgln("Reusing previous connection for {}", url()); dbgln_if(CHTTPJOB_DEBUG, "Reusing previous connection for {}", url());
deferred_invoke([this] { deferred_invoke([this] {
dbgln_if(CHTTPJOB_DEBUG, "HttpJob: on_connected callback"); dbgln_if(CHTTPJOB_DEBUG, "HttpJob: on_connected callback");
on_socket_connected(); on_socket_connected();
}); });
} else { } else {
dbgln("Creating new connection for {}", url()); dbgln_if(CHTTPJOB_DEBUG, "Creating new connection for {}", url());
m_socket->on_connected = [this] { m_socket->on_connected = [this] {
dbgln_if(CHTTPJOB_DEBUG, "HttpJob: on_connected callback"); dbgln_if(CHTTPJOB_DEBUG, "HttpJob: on_connected callback");
on_socket_connected(); on_socket_connected();