@@ -28,7 +28,7 @@ export class PrivateChannel {
28
28
} ;
29
29
30
30
if ( this . options . devMode ) {
31
- Log . info ( `[${ new Date ( ) . toLocaleTimeString ( ) } ] - Sending auth request to: ${ options . url } \n` ) ;
31
+ Log . info ( `[${ new Date ( ) . toISOString ( ) } ] - Sending auth request to: ${ options . url } \n` ) ;
32
32
}
33
33
34
34
return this . serverRequest ( socket , options ) ;
@@ -61,7 +61,7 @@ export class PrivateChannel {
61
61
}
62
62
63
63
if ( this . options . devMode ) {
64
- Log . error ( `[${ new Date ( ) . toLocaleTimeString ( ) } ] - Preparing authentication request to: ${ authHostSelected } ` ) ;
64
+ Log . error ( `[${ new Date ( ) . toISOString ( ) } ] - Preparing authentication request to: ${ authHostSelected } ` ) ;
65
65
}
66
66
67
67
return authHostSelected ;
@@ -87,21 +87,21 @@ export class PrivateChannel {
87
87
this . request . post ( options , ( error , response , body , next ) => {
88
88
if ( error ) {
89
89
if ( this . options . devMode ) {
90
- Log . error ( `[${ new Date ( ) . toLocaleTimeString ( ) } ] - Error authenticating ${ socket . id } for ${ options . form . channel_name } ` ) ;
90
+ Log . error ( `[${ new Date ( ) . toISOString ( ) } ] - Error authenticating ${ socket . id } for ${ options . form . channel_name } ` ) ;
91
91
Log . error ( error ) ;
92
92
}
93
93
94
94
reject ( { reason : 'Error sending authentication request.' , status : 0 } ) ;
95
95
} else if ( response . statusCode !== 200 ) {
96
96
if ( this . options . devMode ) {
97
- Log . warning ( `[${ new Date ( ) . toLocaleTimeString ( ) } ] - ${ socket . id } could not be authenticated to ${ options . form . channel_name } ` ) ;
97
+ Log . warning ( `[${ new Date ( ) . toISOString ( ) } ] - ${ socket . id } could not be authenticated to ${ options . form . channel_name } ` ) ;
98
98
Log . error ( response . body ) ;
99
99
}
100
100
101
101
reject ( { reason : 'Client can not be authenticated, got HTTP status ' + response . statusCode , status : response . statusCode } ) ;
102
102
} else {
103
103
if ( this . options . devMode ) {
104
- Log . info ( `[${ new Date ( ) . toLocaleTimeString ( ) } ] - ${ socket . id } authenticated for: ${ options . form . channel_name } ` ) ;
104
+ Log . info ( `[${ new Date ( ) . toISOString ( ) } ] - ${ socket . id } authenticated for: ${ options . form . channel_name } ` ) ;
105
105
}
106
106
107
107
try {
0 commit comments