3 Initial code from https://github.com/gulpjs/gulp-util/blob/v3.0.6/lib/log.js
5 var chalk = require('chalk');
6 var timestamp = require('time-stamp');
8 function getTimestamp(){
9 return '['+chalk.grey(timestamp('HH:mm:ss'))+']';
13 var time = getTimestamp();
14 process.stdout.write(time + ' ');
15 console.log.apply(console, arguments);
20 var time = getTimestamp();
21 process.stdout.write(time + ' ');
22 console.info.apply(console, arguments);
27 var time = getTimestamp();
28 process.stdout.write(time + ' ');
29 console.dir.apply(console, arguments);
34 var time = getTimestamp();
35 process.stderr.write(time + ' ');
36 console.warn.apply(console, arguments);
41 var time = getTimestamp();
42 process.stderr.write(time + ' ');
43 console.error.apply(console, arguments);
48 module.exports.info = info;
49 module.exports.dir = dir;
50 module.exports.warn = warn;
51 module.exports.error = error;