@@ -33,19 +33,19 @@ if (process.argv[2] === 'child') {
3333 process . on ( 'message' , function ( m , socket ) {
3434 if ( ! socket ) return ;
3535
36- console . error ( '[%d ] got socket' , id , m ) ;
36+ console . error ( `[ ${ id } ] got socket ${ m } ` ) ;
3737
3838 // will call .end('end') or .write('write');
3939 socket [ m ] ( m ) ;
4040
4141 socket . resume ( ) ;
4242
4343 socket . on ( 'data' , function ( ) {
44- console . error ( '[%d ] socket.data' , id , m ) ;
44+ console . error ( `[ ${ id } ] socket.data ${ m } ` ) ;
4545 } ) ;
4646
4747 socket . on ( 'end' , function ( ) {
48- console . error ( '[%d ] socket.end' , id , m ) ;
48+ console . error ( `[ ${ id } ] socket.end ${ m } ` ) ;
4949 } ) ;
5050
5151 // store the unfinished socket
@@ -54,27 +54,27 @@ if (process.argv[2] === 'child') {
5454 }
5555
5656 socket . on ( 'close' , function ( had_error ) {
57- console . error ( '[%d ] socket.close' , id , had_error , m ) ;
57+ console . error ( `[ ${ id } ] socket.close ${ had_error } ${ m } ` ) ;
5858 } ) ;
5959
6060 socket . on ( 'finish' , function ( ) {
61- console . error ( '[%d ] socket finished' , id , m ) ;
61+ console . error ( `[ ${ id } ] socket finished ${ m } ` ) ;
6262 } ) ;
6363 } ) ;
6464
6565 process . on ( 'message' , function ( m ) {
6666 if ( m !== 'close' ) return ;
67- console . error ( '[%d ] got close message' , id ) ;
67+ console . error ( `[ ${ id } ] got close message` ) ;
6868 needEnd . forEach ( function ( endMe , i ) {
69- console . error ( '[%d ] ending %d/%d' , id , i , needEnd . length ) ;
69+ console . error ( `[ ${ id } ] ending ${ i } / ${ needEnd . length } ` ) ;
7070 endMe . end ( 'end' ) ;
7171 } ) ;
7272 } ) ;
7373
7474 process . on ( 'disconnect' , function ( ) {
75- console . error ( '[%d ] process disconnect, ending' , id ) ;
75+ console . error ( `[ ${ id } ] process disconnect, ending` ) ;
7676 needEnd . forEach ( function ( endMe , i ) {
77- console . error ( '[%d ] ending %d/%d' , id , i , needEnd . length ) ;
77+ console . error ( `[ ${ id } ] ending ${ i } / ${ needEnd . length } ` ) ;
7878 endMe . end ( 'end' ) ;
7979 } ) ;
8080 } ) ;
@@ -107,7 +107,7 @@ if (process.argv[2] === 'child') {
107107 connected += 1 ;
108108
109109 socket . once ( 'close' , function ( ) {
110- console . log ( ' [m] socket closed, total %d' , ++ closed ) ;
110+ console . log ( ` [m] socket closed, total ${ ++ closed } ` ) ;
111111 } ) ;
112112
113113 if ( connected === count ) {
0 commit comments