Skip to content

Windows unicode filenames

Xottab-DUTY edited this page Sep 10, 2017 · 6 revisions

spdlog supports unicode filenames under windows. To enable it please uncomment the

#define SPDLOG_WCHAR_FILENAMES

line in the tweakme.h file and use the SPDLOG_FILENAME_T (or L..) macro when specifying filenames:

auto file_logger = spd::rotating_logger_mt("file_logger", L"logs/mylogfile", 1048576 * 5, 3);
auto file_logger2 = spd::rotating_logger_mt("file_logger2", SPDLOG_FILENAME_T("logs/mylogfile2"), 1048576 * 5, 3);