Replies: 1 comment
-
Use spdlog/include/spdlog/spdlog.h Lines 286 to 292 in 508d20f |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Lets say I want to figure out the log level at run time
void print_foo(int level, const std::string& message) { spdlog:log(level, message); }
How do I do this? In my code I create the spdlog::logger object at start up and use macros throughout code to print
`
#define LOG_DEBUG(format, ...) SPDLOG_DEBUG(format, ##VA_ARGS)
#define LOG_INFO(format, ...) SPDLOG_INFO(format, ##VA_ARGS)
`
I do this because I want to use my custom flags, and format the log with line number, file number and function name
Beta Was this translation helpful? Give feedback.
All reactions