Following spdlog documentation I was able to modify the print pattern
#include "spdlog/spdlog.h"
#include "spdlog/sinks/daily_file_sink.h"
int main()
{
spdlog::set_pattern("%H:%M:%S.%e %t %s %! %v");
auto logger = spdlog::daily_logger_mt("daily_logger", "../../../logs/daily.txt", 2, 30);
logger->info("casdc");
return 0;
}
With the above I see daily_logger.txt
contents below:
01:41:35.895 70101 casdc
01:44:22.719 71978 casdc
01:44:35.225 72232 casdc
But I was expecting to see also:
%s Basename of the source file %! Source function
Why I'm not seeing those?
Actually it seems to work if I call
SPDLOG_LOGGER_INFO(logger, "{:>10}", "vsvfsdfv");
But then my question is when should I call
logger->info("casdc");