Options
Modules
  • Command
  • Localization
  • Logger
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • Logger

Index

Methods

Static addDefaultTransport

  • addDefaultTransport(level?: LogLevel): void
  • Adds the default transport to the cache. This must be called if you want to use the logger without providing your own transports, otherwise nothing will happen when you call the logger methods.

    You could call this conditionally to turn Logging on or off, but the preferred method for turning off logging would be Logger.setLogLevel(LogLevel.NONE)

    You can optionally provide a log level which will cause the default transport to override the globally configured log level

    Parameters

    Returns void

Static addTransport

  • Add a logger transport to the cache. Will be used whenever a logging method is called. Key must be a string to identify the given transport so that it may be removed if desired

    Parameters

    Returns void

Static debug

  • debug(tag: string, data: any, ...rest: any[]): void
  • Log to all cached transports if the log level is >= LogLevel.DEBUG

    Parameters

    • tag: string
    • data: any
    • Rest ...rest: any[]

    Returns void

Static error

  • error(tag: string, data: any, ...rest: any[]): void
  • Log to all cached transports if the log level is >= LogLevel.ERROR

    Parameters

    • tag: string
    • data: any
    • Rest ...rest: any[]

    Returns void

Static info

  • info(tag: string, data: any, ...rest: any[]): void
  • Log to all cached transports if the log level is >= LogLevel.INFO

    Parameters

    • tag: string
    • data: any
    • Rest ...rest: any[]

    Returns void

Static removeDefaultTransport

  • removeDefaultTransport(): void
  • Removes the default Logger transport from the logger cache

    Returns void

Static removeTransport

  • removeTransport(key: string): void
  • Removes the transport with the given key from the cache

    Parameters

    • key: string

    Returns void

Static setLogLevel

Static setShard

  • setShard(shard: number): void
  • Sets the shard number for this session

    Parameters

    • shard: number

    Returns void

Static tag

  • Returns a tagged Logger proxy. All logging methods on the proxy will use the given tag

    Parameters

    • tag: string

    Returns LoggerProxy

Static warn

  • warn(tag: string, data: any, ...rest: any[]): void
  • Log to all cached transports if the log level is >= LogLevel.WARN

    Parameters

    • tag: string
    • data: any
    • Rest ...rest: any[]

    Returns void

Generated using TypeDoc