You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It's late in the project and I don't feel like rewriting all my cerr/couts at this time. I've adapted CrowCpp's logging scheme to work with quill and I'd like feedback on improvements or major concerns.
Bulk replaces like s/std::cerr/CERR/ and s/ << std::endl;/;/ seem to be doing the trick.
Issues with things like ostream_iterator need special handling and use in headers is risky with name conflicts, but this is just a stepping stone to just using Quill directly.
Also can't be used like
if (foo)
COUT << "bar";
due to scoping but that's easily fixed with {}.
At this point, I don't care about disabling them by log levels, but that is an obvious extension.
LOG_INFO("Starting up");
COUT << "Starting up";
outputs
06:47:07.432243191 [58624] main.cpp:195 LOG_INFO root Starting up
06:47:07.432397237 [58624] main.cpp:196 LOG_INFO root Starting up
The text was updated successfully, but these errors were encountered:
The problem doing this is that you are formatting everything in the thread that is issuing the log. The library is designed to reduce the overhead by taking a binary copy of the types and dedicating the formatting to a backend logging thread.
If you are okay with the additional overhead of formatting the types to strings on your caller thread then what you have done is okay
It's late in the project and I don't feel like rewriting all my cerr/couts at this time. I've adapted CrowCpp's logging scheme to work with quill and I'd like feedback on improvements or major concerns.
Bulk replaces like
s/std::cerr/CERR/
ands/ << std::endl;/;/
seem to be doing the trick.Issues with things like ostream_iterator need special handling and use in headers is risky with name conflicts, but this is just a stepping stone to just using Quill directly.
Also can't be used like
due to scoping but that's easily fixed with {}.
At this point, I don't care about disabling them by log levels, but that is an obvious extension.
outputs
The text was updated successfully, but these errors were encountered: