From a4b5cdde1843dca8c08fc3d6ddf2b763ef4e873d Mon Sep 17 00:00:00 2001 From: Pat Tullmann Date: Tue, 30 Jun 2015 15:24:30 -0700 Subject: [PATCH] feat(logger): Add date/time stamp to log output The `"%d{DATE}"` in the log pattern adds a date and time stamp to log lines. So you get output like this from karma's logging: ``` 30 06 2015 15:19:56.562:DEBUG [temp-dir]: Creating temp dir at /tmp/karma-43808925 ``` The date and time are handy for figuring out if karma is running slowly. --- lib/constants.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/constants.js b/lib/constants.js index dd980b375..0bafe9e61 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -15,8 +15,8 @@ exports.LOG_INFO = 'INFO' exports.LOG_DEBUG = 'DEBUG' // Default patterns for the pattern layout. -exports.COLOR_PATTERN = '%[%p [%c]: %]%m' -exports.NO_COLOR_PATTERN = '%p [%c]: %m' +exports.COLOR_PATTERN = '%[%d{DATE}:%p [%c]: %]%m' +exports.NO_COLOR_PATTERN = '%d{DATE}:%p [%c]: %m' // Default console appender exports.CONSOLE_APPENDER = {