Skip to content

fill prefix with date, if enabled and empty. #4

Closed
wants to merge 6 commits into from

3 participants

@miira
miira commented Jan 15, 2014

Date is in milliseconds or UTC string format.
The behaviour can be modified with two boolean style fields 'fillDateIfEmpty', 'useMS'.

e.g.
var log = require('npmlog')
log.prefixStyle = { fillDateIfEmpty: true, useMS: true, fg: 'green' }
log.info('', 'show me when it happened');

@iarna
npm member
iarna commented Oct 30, 2015

I would be in favor of having the ability to include a timestamp in the output, but I think replacing empty prefixes is a little too weird. I would expect folks to want both. Plus, prefixes are special in other ways (emitted as event names).

@Foorack
Foorack commented Jan 30, 2016

@iarna @miira What do you think about this approach? #24

@iarna
npm member
iarna commented Mar 16, 2016

I'm closing this because we're definitely not going to replace prefix. I would ask that further discussion happen in #24, which integrates more cleanly with the natural shape of this module.

@iarna iarna closed this Mar 16, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Something went wrong with that request. Please try again.