Trace | API - NativeScript

Summary

Functions

addCategories

addCategories(categories: string): void

Adds categories to existing categories the module will trace.

addEventListener

addWriter

Adds a TraceWriter instance to the trace module.

clearWriters

Clears all the writers from the trace module.

disable

Disables the trace module.

enable

Enables the trace module.

error

error(error: string | Error): void

Passes an error to the registered ErrorHandler

getErrorHandler

isCategorySet

isCategorySet(category: string): boolean

Check if category is already set in trace module.

isEnabled

A function that returns whether the tracer is enabled and there is a point in writing messages. Check this to avoid writing complex string templates. Send error messages even if tracing is disabled.

notifyEvent

notifyEvent(object: Object, name: string, data?: any): void

Notifies all the attached listeners for an event that has occurred in the sender object.

removeEventListener

removeWriter

Removes a TraceWriter instance from the trace module.

setCategories

setCategories(categories: string): void

Sets the categories the module will trace.

setErrorHandler

write

write(message: any, category: string, type?: number): void

Writes a message using the available writers.