Skip to content

Commit 6333ac8

Browse files
committed
logging: fix custom logger timestamp precision
Custom loggers created via `add_custom_logger` were using easylogging's default precision for milliseconds and were ignoring `PFASST_LOGGER_DEFAULT_GLOBAL_MILLISECOND_WIDTH`. This resulted in unaligned logging output.
1 parent 3022436 commit 6333ac8

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

include/pfasst/logging.hpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -166,6 +166,8 @@ namespace pfasst
166166

167167
el::Logger* logger = el::Loggers::getLogger(id);
168168
el::Configurations* conf = logger->configurations();
169+
conf->setGlobally(el::ConfigurationType::MillisecondsWidth,
170+
PFASST_LOGGER_DEFAULT_GLOBAL_MILLISECOND_WIDTH);
169171
conf->set(el::Level::Info, el::ConfigurationType::Format,
170172
TIMESTAMP + INFO_COLOR + "[" + id2print + ", " + LEVEL + " " + MESSAGE + OUT::reset);
171173
conf->set(el::Level::Debug, el::ConfigurationType::Format,

0 commit comments

Comments
 (0)