Is there any drawback to using the default logger? #2130
Answered
by
gabime
bobgeller401
asked this question in
Q&A
-
Hi, Thanks for the great library! Just wondering, is there any drawback to using the default logger except that the logger stays alive until the program exits? RAII/controlling the scope seems the only advantage of creating your own logger. Thanks. Cheers, |
Beta Was this translation helpful? Give feedback.
Answered by
gabime
Oct 4, 2021
Replies: 1 comment 1 reply
-
Hi, Thanks for the nice feedback! No drawback except maybe a slight performance penalty since spdlog needs to fetch the logger from the registry in each call: spdlog/include/spdlog/spdlog-inl.h Line 117 in 8826011 |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
bobgeller401
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hi,
Thanks for the nice feedback!
No drawback except maybe a slight performance penalty since spdlog needs to fetch the logger from the registry in each call:
spdlog/include/spdlog/spdlog-inl.h
Line 117 in 8826011