mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix tracing
This commit is contained in:
@@ -3,13 +3,13 @@ import * as helper from "../ui/helper";
|
||||
import * as platform from "platform";
|
||||
import * as trace from "trace";
|
||||
import {Color} from "color";
|
||||
import {NavigationEntry, NavigationTransition, topmost as topmostFrame} from "ui/frame";
|
||||
import {NavigationEntry, NavigationTransition, topmost as topmostFrame, traceEnabled} from "ui/frame";
|
||||
import {Page} from "ui/page";
|
||||
import {AnimationCurve} from "ui/enums"
|
||||
|
||||
function _testTransition(navigationTransition: NavigationTransition) {
|
||||
var testId = `Transition[${JSON.stringify(navigationTransition)}]`;
|
||||
if (trace.enabled) {
|
||||
if (traceEnabled()) {
|
||||
trace.write(`Testing ${testId}`, trace.categories.Test);
|
||||
}
|
||||
var navigationEntry: NavigationEntry = {
|
||||
|
||||
@@ -29,7 +29,7 @@ export var test_DummyTestForSnippetOnly2 = function () {
|
||||
// >> trace-message
|
||||
trace.setCategories(trace.categories.Debug);
|
||||
trace.enable();
|
||||
if (trace.enabled) {
|
||||
if (trace.isEnabled()) {
|
||||
trace.write("My Debug Message", trace.categories.Debug);
|
||||
}
|
||||
// << trace-message
|
||||
|
||||
Reference in New Issue
Block a user