@@ -81,15 +81,6 @@ export class Logger implements ILogger {
8181 this . logMessage ( args , LoggerLevel . INFO ) ;
8282 }
8383
84- /**
85- * DEPRECATED
86- * Present only for backwards compatibility as some plugins (nativescript-plugin-firebase)
87- * use $logger.out in their hooks
88- */
89- out ( ...args : any [ ] ) : void {
90- this . info ( args ) ;
91- }
92-
9384 debug ( ...args : any [ ] ) : void {
9485 const encodedArgs : string [ ] = this . getPasswordEncodedArguments ( args ) ;
9586 this . logMessage ( encodedArgs , LoggerLevel . DEBUG ) ;
@@ -200,6 +191,37 @@ export class Logger implements ILogger {
200191 return argument ;
201192 } ) ;
202193 }
194+
195+ /*******************************************************************************************
196+ * Metods below are deprecated. Delete them in 6.0.0 release: *
197+ * Present only for backwards compatibility as some plugins (nativescript-plugin-firebase) *
198+ * use these methods in their hooks *
199+ *******************************************************************************************/
200+
201+ out ( ...args : any [ ] ) : void {
202+ this . info ( args ) ;
203+ }
204+
205+ write ( ...args : any [ ] ) : void {
206+ this . info ( args , { [ LoggerConfigData . skipNewLine ] : true } ) ;
207+ }
208+
209+ printOnStderr ( ...args : string [ ] ) : void {
210+ this . error ( args ) ;
211+ }
212+
213+ printInfoMessageOnSameLine ( message : string ) : void {
214+ this . info ( message , { [ LoggerConfigData . skipNewLine ] : true } ) ;
215+ }
216+
217+ printMsgWithTimeout ( message : string , timeout : number ) : Promise < void > {
218+ return new Promise < void > ( ( resolve , reject ) => {
219+ setTimeout ( ( ) => {
220+ this . printInfoMessageOnSameLine ( message ) ;
221+ resolve ( ) ;
222+ } , timeout ) ;
223+ } ) ;
224+ }
203225}
204226
205227$injector . register ( "logger" , Logger ) ;
0 commit comments