@@ -89,18 +89,15 @@ exports.run = function (options) {
89
89
// logger
90
90
app . use ( function ( req , res , next ) {
91
91
var end = res . end ;
92
- req . _startTime = new Date ( ) ;
93
92
94
93
res . end = function ( chunk , encoding ) {
95
94
// res.end = end;
96
- end . call ( res , chunk , encoding , function ( ) {
97
- log ( req . url + ' cost ' + ( Date . now ( ) - req . _startTime ) ) ;
98
- } ) ;
95
+ end . call ( res , chunk , encoding ) ;
99
96
100
97
var isNotMap = sysPath . extname ( req . url ) !== '.map' ;
101
98
var isNotHotUpdate = req . url . indexOf ( 'hot-update' ) === - 1 ;
102
99
if ( isNotMap && isNotHotUpdate ) {
103
- var format = '%date %status %method %url %contentLength %cost ' ;
100
+ var format = '%date %status %method %url %contentLength' ;
104
101
105
102
var parseResult = parse ( req , res , format ) ;
106
103
return process . nextTick ( function ( ) {
@@ -138,7 +135,6 @@ exports.run = function (options) {
138
135
format = format . replace ( / % u r l / g, decodeURI ( req . originalUrl ) ) ;
139
136
format = format . replace ( / % s t a t u s / g, String ( res . statusCode ) [ statusColor ] ) ;
140
137
format = format . replace ( / % c o n t e n t L e n g t h / g, contentLength . grey ) ;
141
- format = format . replace ( / % c o s t / g, Date . now ( ) - req . _startTime ) ;
142
138
143
139
return {
144
140
message : format ,
0 commit comments