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
I would like to show filename and line number in the global logger.
I tried to use the macros like
SPDLOG_DEBUG(...)
but seems like it depends on constant static level defined with #define otherwise it's not print anything (also I can't change it?). However I would like to simply use:
spdlog::debug(...)
And it will show line numbers.
If it's not possible and it's possible only when specifying the logger, should I declare the logger statically in some header file and use it directly eg.
spdlog::debug(g_logger, ...)
TLDR of what I'm looking for:
int main() { spdlog::cfg::load_env_levels(); spdlog::debug("hello"); return 0;}./appDEBUG main.cpp:2: hello
Replace all logging statements with logging macros and define #define SPDLOG_ACTIVE_LEVEL SPDLOG_LEVEL_TRACE macro (before using spdlog) so that logging macros are not removed.
Hi!
I would like to show filename and line number in the global logger.
I tried to use the macros like
SPDLOG_DEBUG(...)
but seems like it depends on constant static level defined with
#define
otherwise it's not print anything (also I can't change it?). However I would like to simply use:spdlog::debug(...)
And it will show line numbers.
If it's not possible and it's possible only when specifying the logger, should I declare the logger statically in some header file and use it directly eg.
spdlog::debug(g_logger, ...)
TLDR of what I'm looking for:
The project for repo: loud.cpp
The text was updated successfully, but these errors were encountered: