From 318ab58e106c303e5916d52072e823c215b4a310 Mon Sep 17 00:00:00 2001 From: gabime Date: Mon, 27 Jan 2014 13:03:16 +0200 Subject: [PATCH] fix --- include/c11log/sinks/file_sinks.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/include/c11log/sinks/file_sinks.h b/include/c11log/sinks/file_sinks.h index 798c7c4a..d1a140be 100644 --- a/include/c11log/sinks/file_sinks.h +++ b/include/c11log/sinks/file_sinks.h @@ -149,11 +149,10 @@ private: static std::string _calc_filename(const std::string& basename, const std::string& extension) { - std::ostringstream oss; std::tm tm = c11log::details::os::localtime(); char buf[32]; - sprintf(buf, ".%Y-%m-%d.", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); - return buf; + sprintf(buf, ".%d-%02d-%02d.", tm.tm_year + 1900, tm.tm_mon + 1, tm.tm_mday); + return basename+buf; } std::string _base_filename;