/openbmc/bmcweb/include/ |
H A D | ossl_random.hpp | diff 17c472452c9a3518aeac636d01b8e2f01c4fa21f Mon Apr 08 19:18:12 CDT 2024 Ed Tanous <ed@tanous.net> 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>
|
H A D | async_resolve.hpp | diff 17c472452c9a3518aeac636d01b8e2f01c4fa21f Mon Apr 08 19:18:12 CDT 2024 Ed Tanous <ed@tanous.net> 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>
|
/openbmc/bmcweb/http/ |
H A D | verb.hpp | diff 17c472452c9a3518aeac636d01b8e2f01c4fa21f Mon Apr 08 19:18:12 CDT 2024 Ed Tanous <ed@tanous.net> 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>
|
H A D | logging.hpp | diff 17c472452c9a3518aeac636d01b8e2f01c4fa21f Mon Apr 08 19:18:12 CDT 2024 Ed Tanous <ed@tanous.net> 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>
|
H A D | http_client.hpp | diff 17c472452c9a3518aeac636d01b8e2f01c4fa21f Mon Apr 08 19:18:12 CDT 2024 Ed Tanous <ed@tanous.net> 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>
|
/openbmc/bmcweb/redfish-core/include/ |
H A D | registries.hpp | diff 17c472452c9a3518aeac636d01b8e2f01c4fa21f Mon Apr 08 19:18:12 CDT 2024 Ed Tanous <ed@tanous.net> 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>
|