0
Fork 0
mirror of https://github.com/verdaccio/verdaccio.git synced 2025-01-27 22:59:51 -05:00

Merge branch 'master' into 4.x

This commit is contained in:
Juan Picado @jotadeveloper 2018-09-09 08:32:33 +02:00 committed by GitHub
commit 0df8c10619
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -6,6 +6,7 @@ const chalk = require('chalk');
const Utils = require('./utils');
const pkgJSON = require('../../package.json');
const _ = require('lodash');
const {format} = require('date-fns');
/**
* Match the level based on buyan severity scale
@ -101,7 +102,7 @@ function setup(logs) {
} else if (target.format === 'pretty-timestamped') {
// making fake stream for pretty pritting
stream.write = (obj) => {
destination.write(`${obj.time.toISOString()}${print(obj.level, obj.msg, obj, destinationIsTTY)}\n`);
destination.write(`[${format(obj.time, 'YYYY-MM-DD HH:mm:ss')}] ${print(obj.level, obj.msg, obj, destinationIsTTY)}\n`);
};
} else {
stream.write = (obj) => {