Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "trace"

Allows you to trace and print specific information based on categories.

Index

Variables

enabled

enabled: boolean

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

Functions

addCategories

  • addCategories(categories: string): any
  • Adds categories to existing categories the module will trace.

    Parameters

    • categories: string

      The comma-separated list of categories. If not specified all messages from all categories will be traced.

    Returns any

addEventListener

addWriter

  • Adds a TraceWriter instance to the trace module.

    Parameters

    Returns any

clearWriters

  • clearWriters(): any

disable

  • disable(): void

enable

  • enable(): void

isCategorySet

  • isCategorySet(category: string): boolean
  • Check if category is already set in trace module.

    Parameters

    • category: string

      The category to check.

    Returns boolean

notifyEvent

  • notifyEvent(object: Object, name: string, data?: any): any
  • Notifies all the attached listeners for an event that has occurred in the sender object.

    Parameters

    • object: Object

      The Object instance that raised the event.

    • name: string

      The name of the raised event.

    • Optional data: any

      An optional parameter that passes the data associated with the event.

    Returns any

removeEventListener

removeWriter

  • Removes a TraceWriter instance from the trace module.

    Parameters

    • writer: TraceWriter

      The TraceWriter instance to remove.

    Returns any

setCategories

  • setCategories(categories: string): any
  • Sets the categories the module will trace.

    Parameters

    • categories: string

      The comma-separated list of categories. If not specified all messages from all categories will be traced.

    Returns any

write

  • write(message: any, category: string, type?: number): any
  • Writes a message using the available writers.

    Parameters

    • message: any

      The message to be written.

    • category: string

      The category of the message.

    • Optional type: number

      Optional, the type of the message - info, warning, error.

    Returns any

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method