mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
fix(log): Allow passing optional params for logs (#9456)
This commit is contained in:
committed by
GitHub
parent
f6faa4509a
commit
7b800945dd
@@ -6,11 +6,11 @@ export function uptime() {
|
||||
return global.android ? (<any>org).nativescript.Process.getUpTime() : (<any>global).__tns_uptime();
|
||||
}
|
||||
|
||||
export function log(message: string): void {
|
||||
export function log(message: string, ...optionalParams: any[]): void {
|
||||
if ((<any>global).__nslog) {
|
||||
(<any>global).__nslog('CONSOLE LOG: ' + message);
|
||||
}
|
||||
console.log(message);
|
||||
console.log(message, ...optionalParams);
|
||||
}
|
||||
|
||||
export type InstrumentationMode = 'counters' | 'timeline' | 'lifecycle';
|
||||
|
||||
Reference in New Issue
Block a user