Add seconds to the output of log messages

This commit is contained in:
Danny Robson 2012-05-03 15:55:09 +10:00
parent 91ad9b0473
commit 610ca2d46d

View File

@ -115,11 +115,11 @@ util::detail::log (level_t level, boost::format &&format) {
static const boost::format LEVEL_FORMAT ("%s [%s] "); static const boost::format LEVEL_FORMAT ("%s [%s] ");
char time_string[strlen("YYYY-mm-dd HHMMh") + 1]; char time_string[strlen("YYYY-mm-dd HHMMhSS") + 1];
time_t unix_time = time (nullptr); time_t unix_time = time (nullptr);
if (0 == strftime (time_string, if (0 == strftime (time_string,
elems (time_string), elems (time_string),
"%Y-%m-%d %H%Mh", "%Y-%m-%d %H%Mh%S",
localtime (&unix_time))) { localtime (&unix_time))) {
unusual (); unusual ();
return; return;