How to put in log string + int? #2120
Answered
by
tt4g
maksglukhov
asked this question in
Q&A
-
Hi guys, I need to put in logs message + int how should i do? |
Beta Was this translation helpful? Give feedback.
Answered by
tt4g
Sep 26, 2021
Replies: 1 comment 1 reply
-
fmt library is used to format log messages with arguments in spdlog. auto mylogger = spdlog::basic_logger_mt("logger", "logs/logs.txt");
mylogger->info("The number to guess is: {}", ran); And see fmt documentation: https://fmt.dev/8.0.0/ |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
maksglukhov
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
fmt library is used to format log messages with arguments in spdlog.
Try it.
And see fmt documentation: https://fmt.dev/8.0.0/