File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -12,7 +12,6 @@ var fs = require('fs');
12
12
var byline = require ( 'byline' ) ;
13
13
var through = require ( 'through' ) ;
14
14
var duplexer = require ( 'duplexer' ) ;
15
- var moment = require ( 'moment' ) ;
16
15
17
16
module . exports = Logger ;
18
17
@@ -102,7 +101,7 @@ function textFormatter(options) {
102
101
var line = util . format ( '%s%s' , textifyTags ( logEvent . tag ) ,
103
102
logEvent . msg . toString ( ) ) ;
104
103
if ( options . timeStamp ) {
105
- line = util . format ( '%s %s' , moment ( logEvent . time ) . toISOString ( ) , line ) ;
104
+ line = util . format ( '%s %s' , new Date ( logEvent . time ) . toISOString ( ) , line ) ;
106
105
}
107
106
this . emit ( 'data' , line . replace ( / \n / g, '\\n' ) ) ;
108
107
}
@@ -125,7 +124,7 @@ function jsonFormatter(options) {
125
124
126
125
function jsonify ( logEvent ) {
127
126
if ( options . timeStamp ) {
128
- logEvent . time = moment ( logEvent . time ) . toISOString ( ) ;
127
+ logEvent . time = new Date ( logEvent . time ) . toISOString ( ) ;
129
128
} else {
130
129
delete logEvent . time ;
131
130
}
Original file line number Diff line number Diff line change 30
30
"byline" : " ^5.0.0" ,
31
31
"duplexer" : " ^0.1.1" ,
32
32
"minimist" : " ^1.2.0" ,
33
- "moment" : " ^2.6.0" ,
34
33
"through" : " ^2.3.4"
35
34
},
36
35
"devDependencies" : {
You can’t perform that action at this time.
0 commit comments