mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
console moved from application to globals
This commit is contained in:
@@ -278,7 +278,7 @@ export class Console {
|
||||
}
|
||||
|
||||
public log(message: any, ...formatParams: any[]): void {
|
||||
helperModule.log(this.formatParams.apply(this, arguments));
|
||||
helperModule.helper_log(this.formatParams.apply(this, arguments));
|
||||
}
|
||||
|
||||
public trace(): void {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
var TAG = 'JS';
|
||||
|
||||
export var log = function (message: string) {
|
||||
export var helper_log = function (message: string) {
|
||||
android.util.Log.v(TAG, message);
|
||||
}
|
||||
|
||||
|
||||
2
Console/console_helper.d.ts
vendored
2
Console/console_helper.d.ts
vendored
@@ -1,4 +1,4 @@
|
||||
export declare var log: (message: string) => void;
|
||||
export declare var helper_log: (message: string) => void;
|
||||
export declare var info: (message: string) => void;
|
||||
export declare var error: (message: string) => void;
|
||||
export declare var warn: (message: string) => void;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
// TODO: we should use Foundation.NSLog() but it currently does not work
|
||||
// TODO: Is there a better way to implement the info/warn/error
|
||||
|
||||
export var log = function (message: string) {
|
||||
export var helper_log = function (message: string) {
|
||||
log('log: ' + message);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user