diff --git a/src/Loggers/Loggers.cpp b/src/Loggers/Loggers.cpp index 90b3457b7d8..258853e8162 100644 --- a/src/Loggers/Loggers.cpp +++ b/src/Loggers/Loggers.cpp @@ -46,7 +46,7 @@ static std::string renderFileNameTemplate(time_t now, const std::string & file_p std::tm buf; localtime_r(&now, &buf); std::ostringstream ss; // STYLE_CHECK_ALLOW_STD_STRING_STREAM - ss << std::put_time(&buf, file_path.c_str()); + ss << std::put_time(&buf, path.filename().c_str()); return path.replace_filename(ss.str()); }