summaryrefslogtreecommitdiff
path: root/http/http_client.hpp
diff options
context:
space:
mode:
authorEd Tanous <ed@tanous.net>2024-04-09 03:18:12 +0300
committerEd Tanous <ed@tanous.net>2024-05-07 03:37:41 +0300
commit17c472452c9a3518aeac636d01b8e2f01c4fa21f (patch)
tree39dcf835f3ea7836290b7f77c15f48abae46caff /http/http_client.hpp
parent8b901d78af166fa3017d930cf121b1dad6edbe0b (diff)
downloadbmcweb-17c472452c9a3518aeac636d01b8e2f01c4fa21f.tar.xz
Move logging args
Args captured by logging functions should be captured by rvalue, and use std::forward to get perfect forwarding. In addition, separate out the various std::out lines. While we're here, also try to optimize a little. We should ideally be writing each log line to the output once, and ideally not use iostreams, which induce a lot of overhead. Similar to spdlog[1] (which at one point this codebase used), construct the string, then call fwrite and fflush once, rather than calling std::cout repeatedly. Now that we don't have a dependency on iostreams anymore, we can remove it from the places where it has snuck in. Tested: Logging still functions as before. Logs present. [1] https://github.com/gabime/spdlog/blob/27cb4c76708608465c413f6d0e6b8d99a4d84302/include/spdlog/sinks/stdout_sinks-inl.h#L70C7-L70C13 Change-Id: I1dd4739e06eb506d68989a066d122109b71b92cd Signed-off-by: Ed Tanous <ed@tanous.net>
Diffstat (limited to 'http/http_client.hpp')
-rw-r--r--http/http_client.hpp1
1 files changed, 0 insertions, 1 deletions
diff --git a/http/http_client.hpp b/http/http_client.hpp
index ac231b42e7..0bfb3818df 100644
--- a/http/http_client.hpp
+++ b/http/http_client.hpp
@@ -44,7 +44,6 @@
#include <cstdlib>
#include <functional>
-#include <iostream>
#include <memory>
#include <queue>
#include <string>