Options
All
  • Public
  • Public/Protected
  • All
Menu

Namespace Trace

Index

Functions

addCategories

  • addCategories(categories: string): void
  • 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 void

addEventListener

addWriter

  • Adds a TraceWriter instance to the trace module.

    Parameters

    Returns void

clearWriters

  • clearWriters(): void
  • Clears all the writers from the trace module.

    Returns void

disable

  • disable(): void

enable

  • enable(): void

error

  • error(error: string | Error): void
  • Passes an error to the registered ErrorHandler

    Parameters

    • error: string | Error

      The error to be handled.

    Returns void

getErrorHandler

isCategorySet

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

    Parameters

    • category: string

      The category to check.

    Returns boolean

isEnabled

  • isEnabled(): boolean
  • 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.

    Returns boolean

notifyEvent

  • notifyEvent(object: Object, name: string, data?: any): void
  • 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 void

removeEventListener

removeWriter

  • Removes a TraceWriter instance from the trace module.

    Parameters

    • writer: TraceWriter

      The TraceWriter instance to remove.

    Returns void

setCategories

  • setCategories(categories: string): void
  • 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 void

setErrorHandler

write

  • write(message: any, category: string, type?: number): void
  • 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 void

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