Closed
Description
logger.js
const moment = require('moment')
const debug = require('debug')
const log = debug('adonuxt-rp:log [ %s ]', moment().format())
const error = debug('adonuxt-rp:error [ %s ]', moment().format())
debug.log = console.info.bind(console) // https://www.npmjs.com/package/debug#output-streams
const logger = {
log,
error
}
module.exports = logger
module.exports.default = logger
I have that module imported throughout my app and is using it like so
logger.log('Successfully created')
The output is not what I expect
adonuxt-rp:log [ +398ms ] Successfully created
Why is my date output defaulting to the millisecond output?
I'm expecting an output similiar to this:
adonuxt-rp:log [ 2017-05-14T04:08:26-05:00 ] Successfully created
Metadata
Metadata
Assignees
Labels
No labels