File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -42,13 +42,6 @@ function deploy(config, ready) {
4242 return path . posix . join ( ...url . split ( path . sep ) ) ;
4343 }
4444
45- let txtLogger = undefined ;
46- if ( config . log !== "" ) {
47- txtLogger = fs . createWriteStream ( config . log , {
48- flags : 'as'
49- } ) ;
50- }
51-
5245 server . on ( 'request' , ( request , response ) => {
5346 let data = '' ;
5447
@@ -59,7 +52,7 @@ function deploy(config, ready) {
5952 request . on ( 'end' , ( ) => {
6053 if ( config . log !== "" ) {
6154 let now = config . logTime ? `[${ formatTime . format ( new Date ( ) ) } ] ` : '' ;
62- txtLogger . write ( `${ now } ${ request . method } ${ request . url } ${ JSON . stringify ( data ) } \n` ) ;
55+ fs . writeFileSync ( config . log , `${ now } ${ request . method } ${ request . url } ${ JSON . stringify ( data ) } \n` ) ;
6356 }
6457
6558 if ( config . noCache ) {
You can’t perform that action at this time.
0 commit comments