Fix tracing

This commit is contained in:
Rossen Hristov
2017-01-16 13:29:46 +02:00
parent 830f097118
commit fec5e92dbe
32 changed files with 211 additions and 207 deletions

View File

@@ -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 = {

View File

@@ -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