Skip to content

Commit a4b5cdd

Browse files
tullmanndignifiedquire
authored andcommitted
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.
1 parent 6a9df4a commit a4b5cdd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

lib/constants.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ exports.LOG_INFO = 'INFO'
1515
exports.LOG_DEBUG = 'DEBUG'
1616

1717
// Default patterns for the pattern layout.
18-
exports.COLOR_PATTERN = '%[%p [%c]: %]%m'
19-
exports.NO_COLOR_PATTERN = '%p [%c]: %m'
18+
exports.COLOR_PATTERN = '%[%d{DATE}:%p [%c]: %]%m'
19+
exports.NO_COLOR_PATTERN = '%d{DATE}:%p [%c]: %m'
2020

2121
// Default console appender
2222
exports.CONSOLE_APPENDER = {

0 commit comments

Comments
 (0)