-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Multi-sink logger behavior with File and line number set in the pattern #2043
Comments
Right. This is a specification. Another way. you can use https://github.com/gabime/spdlog/blob/v1.9.1/include/spdlog/spdlog.h#L291-L299 |
@tt4g thanks for the clarification. A quick follow up, If I call my logger directly for tracing (writing to file), can I still compile away? (like SPDLOG_XXX). I can't set |
Logging macros ( Calling the log function in any other way incurs costs such as comparing log levels. |
super, in that case, I think I can do the same by defining my own macros using |
hi all -
Using the multi-sink logger example, I'd like to add
%g %#
in thefile_sink
pattern to print out file and line number.However, it seems the only way to call this is through
SPDLOG_LOGGER_TRACE(logger, ...)
. If I uselogger->trace()
, it will not honor the pattern. Is this correct behavior? or am I missing something here?TIA
The text was updated successfully, but these errors were encountered: