From 17c472452c9a3518aeac636d01b8e2f01c4fa21f Mon Sep 17 00:00:00 2001 From: Ed Tanous Date: Mon, 8 Apr 2024 17:18:12 -0700 Subject: 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 --- include/async_resolve.hpp | 1 - 1 file changed, 1 deletion(-) (limited to 'include/async_resolve.hpp') diff --git a/include/async_resolve.hpp b/include/async_resolve.hpp index 2d9899d1a4..dbc0cfc749 100644 --- a/include/async_resolve.hpp +++ b/include/async_resolve.hpp @@ -8,7 +8,6 @@ #include #include -#include #include namespace async_resolve -- cgit v1.2.3