Options
All
  • Public
  • Public/Protected
  • All
Menu

Class Log

Hierarchy

Implements

Index

Constructors

constructor

Properties

debug

debug: (...args: any[]) => void

Type declaration

    • (...args: any[]): void
    • Parameters

      • Rest ...args: any[]

      Returns void

error

error: (...args: any[]) => void

Type declaration

    • (...args: any[]): void
    • Parameters

      • Rest ...args: any[]

      Returns void

info

info: (...args: any[]) => void

Type declaration

    • (...args: any[]): void
    • Parameters

      • Rest ...args: any[]

      Returns void

Protected sources

sources: Array<LogSource | string>

trace

trace: (...args: any[]) => void

Type declaration

    • (...args: any[]): void
    • Parameters

      • Rest ...args: any[]

      Returns void

warn

warn: (...args: any[]) => void

Type declaration

    • (...args: any[]): void
    • Parameters

      • Rest ...args: any[]

      Returns void

Static fileCallback

fileCallback: ((...args: any[]) => void) | undefined

Static fileLogger

fileLogger: ((...args: any[]) => void) | undefined

Static fileSize

fileSize: number

Static fileStream

fileStream: IFileStream | undefined

Static preConsoleCallbacks

preConsoleCallbacks: Array<(...args: any[]) => void> = []

Static sourceFilterRegexCache

sourceFilterRegexCache: Partial<Record<"developer" | "default", RegExp>>

Methods

setSources

  • setSources(...sources: Array<LogSource | string>): void

setup

  • setup(): void
  • Re-binds the Log methods. Called automatically when the winston instance is set.

    Returns void

Static addPreConsoleCallback

  • addPreConsoleCallback(cb: (...args: any[]) => void): void
  • Parameters

    • cb: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

Static debug

  • debug(...sources: Array<LogSource | string>): (...args: any[]) => void
  • Returns a method that can be used to Log.debug with the given sources.

    Parameters

    • Rest ...sources: Array<LogSource | string>

      A list of sources to log to.

    Returns (...args: any[]) => void

      • (...args: any[]): void
      • Parameters

        • Rest ...args: any[]

        Returns void

Static error

  • error(...sources: Array<LogSource | string>): (...args: any[]) => void
  • Returns a method that can be used to Log.error with the given sources.

    Parameters

    • Rest ...sources: Array<LogSource | string>

      A list of sources to log to.

    Returns (...args: any[]) => void

      • (...args: any[]): void
      • Parameters

        • Rest ...args: any[]

        Returns void

Static finalizeSetup

  • finalizeSetup(): void
  • Returns void

Static getFileStreamInfo

Static info

  • info(...sources: Array<LogSource | string>): (...args: any[]) => void
  • Returns a method that can be used to Log.info with the given sources.

    Parameters

    • Rest ...sources: Array<LogSource | string>

      A list of sources to log to.

    Returns (...args: any[]) => void

      • (...args: any[]): void
      • Parameters

        • Rest ...args: any[]

        Returns void

Static initializeGameState

  • initializeGameState(): void
  • Returns void

Static refresh

  • refresh(): void
  • Returns void

Static removePreConsoleCallback

  • removePreConsoleCallback(cb: (...args: any[]) => void): void
  • Parameters

    • cb: (...args: any[]) => void
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    Returns void

Static setCallback

  • setCallback(cb?: undefined | ((...args: any[]) => void)): void
  • Parameters

    • Optional cb: undefined | ((...args: any[]) => void)

    Returns void

Static setSourceFilter

  • setSourceFilter(logType: LogType, enable: boolean, ...sources: Array<LogSource | string>): void
  • Parameters

    Returns void

Static setupFileLogger

  • Takes a winston instance and a path. Updates the static Log methods to use the winston instance.

    Parameters

    Returns void

Static shouldLog

  • Parameters

    Returns boolean

Static sourceFilter

  • sourceFilter(): any
  • Returns any

Static sourceFilterRegex

  • Returns RegExp

Static startSetup

  • startSetup(): void
  • Returns void

Static trace

  • trace(...sources: Array<LogSource | string>): (...args: any[]) => void
  • Returns a method that can be used to Log.trace with the given sources.

    Parameters

    • Rest ...sources: Array<LogSource | string>

      A list of sources to log to.

    Returns (...args: any[]) => void

      • (...args: any[]): void
      • Parameters

        • Rest ...args: any[]

        Returns void

Static warn

  • warn(...sources: Array<LogSource | string>): (...args: any[]) => void
  • Returns a method that can be used to Log.warn with the given sources.

    Parameters

    • Rest ...sources: Array<LogSource | string>

      A list of sources to log to.

    Returns (...args: any[]) => void

      • (...args: any[]): void
      • Parameters

        • Rest ...args: any[]

        Returns void

Object literals

Static sourceFilterCache

sourceFilterCache: object

[LogType.Console]

[LogType.Console]: Map<any, any> = new Map()

[LogType.File]

[LogType.File]: Map<any, any> = new Map()

Generated using TypeDoc