Trace | API - NativeScript
Summary
Functions
addCategories
addCategories(categories: string): voidAdds 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): voidPasses an error to the registered ErrorHandler
getErrorHandler
isCategorySet
isCategorySet(category: string): booleanCheck 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): voidNotifies 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): voidSets the categories the module will trace.
setErrorHandler
write
write(message: any, category: string, type?: number): voidWrites a message using the available writers.