summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/boost_asio.cpp6
-rw-r--r--src/webserver_main.cpp22
2 files changed, 14 insertions, 14 deletions
diff --git a/src/boost_asio.cpp b/src/boost_asio.cpp
index 53f2fd6945..9e9107487a 100644
--- a/src/boost_asio.cpp
+++ b/src/boost_asio.cpp
@@ -9,14 +9,14 @@ namespace boost
{
void throw_exception(const std::exception& e)
{
- BMCWEB_LOG_CRITICAL << "Boost exception thrown " << e.what();
+ BMCWEB_LOG_CRITICAL("Boost exception thrown {}", e.what());
std::terminate();
}
void throw_exception(const std::exception& e, const source_location& loc)
{
- BMCWEB_LOG_CRITICAL << "Boost exception thrown " << e.what() << " from "
- << loc;
+ BMCWEB_LOG_CRITICAL("Boost exception thrown {} from {}:{}", e.what(),
+ loc.file_name(), loc.line());
std::terminate();
}
} // namespace boost
diff --git a/src/webserver_main.cpp b/src/webserver_main.cpp
index 8150f460ad..67e2aaef04 100644
--- a/src/webserver_main.cpp
+++ b/src/webserver_main.cpp
@@ -39,25 +39,25 @@ inline void setupSocket(crow::App& app)
int listenFd = sd_listen_fds(0);
if (1 == listenFd)
{
- BMCWEB_LOG_INFO << "attempting systemd socket activation";
+ BMCWEB_LOG_INFO("attempting systemd socket activation");
if (sd_is_socket_inet(SD_LISTEN_FDS_START, AF_UNSPEC, SOCK_STREAM, 1,
0) != 0)
{
- BMCWEB_LOG_INFO << "Starting webserver on socket handle "
- << SD_LISTEN_FDS_START;
+ BMCWEB_LOG_INFO("Starting webserver on socket handle {}",
+ SD_LISTEN_FDS_START);
app.socket(SD_LISTEN_FDS_START);
}
else
{
- BMCWEB_LOG_INFO
- << "bad incoming socket, starting webserver on port "
- << defaultPort;
+ BMCWEB_LOG_INFO(
+ "bad incoming socket, starting webserver on port {}",
+ defaultPort);
app.port(defaultPort);
}
}
else
{
- BMCWEB_LOG_INFO << "Starting webserver on port " << defaultPort;
+ BMCWEB_LOG_INFO("Starting webserver on port {}", defaultPort);
app.port(defaultPort);
}
}
@@ -133,13 +133,13 @@ static int run()
int rc = redfish::EventServiceManager::startEventLogMonitor(*io);
if (rc != 0)
{
- BMCWEB_LOG_ERROR << "Redfish event handler setup failed...";
+ BMCWEB_LOG_ERROR("Redfish event handler setup failed...");
return rc;
}
#endif
#ifdef BMCWEB_ENABLE_SSL
- BMCWEB_LOG_INFO << "Start Hostname Monitor Service...";
+ BMCWEB_LOG_INFO("Start Hostname Monitor Service...");
crow::hostname_monitor::registerHostnameSignal();
#endif
@@ -161,12 +161,12 @@ int main(int /*argc*/, char** /*argv*/)
}
catch (const std::exception& e)
{
- BMCWEB_LOG_CRITICAL << "Threw exception to main: " << e.what();
+ BMCWEB_LOG_CRITICAL("Threw exception to main: {}", e.what());
return -1;
}
catch (...)
{
- BMCWEB_LOG_CRITICAL << "Threw exception to main";
+ BMCWEB_LOG_CRITICAL("Threw exception to main");
return -1;
}
}