Add LOG macro to prevent unnecessary evaluations (#823)

Fixes #824
This commit is contained in:
Alex Kremer
2023-08-15 14:36:11 +01:00
committed by GitHub
parent 547cb340bd
commit ec70127050
44 changed files with 418 additions and 374 deletions

View File

@@ -59,8 +59,8 @@ PlainSource::close(bool startAgain)
derived().ws().async_close(boost::beast::websocket::close_code::normal, [this, startAgain](auto ec) {
if (ec)
{
log_.error() << " async_close : "
<< "error code = " << ec << " - " << toString();
LOG(log_.error()) << " async_close : "
<< "error code = " << ec << " - " << toString();
}
closing_ = false;
if (startAgain)
@@ -94,8 +94,8 @@ SslSource::close(bool startAgain)
derived().ws().async_close(boost::beast::websocket::close_code::normal, [this, startAgain](auto ec) {
if (ec)
{
log_.error() << " async_close : "
<< "error code = " << ec << " - " << toString();
LOG(log_.error()) << " async_close : "
<< "error code = " << ec << " - " << toString();
}
closing_ = false;
if (startAgain)
@@ -193,4 +193,4 @@ SslSource::onSslHandshake(
ws().async_handshake(host, "/", [this](auto ec) { onHandshake(ec); });
}
}
} // namespace etl
} // namespace etl