@@ -81,15 +81,6 @@ export class Logger implements ILogger {
81
81
this . logMessage ( args , LoggerLevel . INFO ) ;
82
82
}
83
83
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
-
93
84
debug ( ...args : any [ ] ) : void {
94
85
const encodedArgs : string [ ] = this . getPasswordEncodedArguments ( args ) ;
95
86
this . logMessage ( encodedArgs , LoggerLevel . DEBUG ) ;
@@ -200,6 +191,37 @@ export class Logger implements ILogger {
200
191
return argument ;
201
192
} ) ;
202
193
}
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
+ }
203
225
}
204
226
205
227
$injector . register ( "logger" , Logger ) ;
0 commit comments