Skip to content

Commit

Permalink
feat(logger): Add date/time stamp to log output
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tullmann authored and dignifiedquire committed Jul 13, 2015
1 parent 6a9df4a commit a4b5cdd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/constants.js
Expand Up @@ -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 = {
Expand Down

0 comments on commit a4b5cdd

Please sign in to comment.