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

Cache singleton that can be used for caching logging related metadata from within your custom logger transports. Avoid using keys beginning with __ (That's two (2) underscores) as any base transports use those keys for their metadata and you wouldn't want to overwrite those.

All methods are static and will automatically create/use the singleton instance. You do not ever need to instantiate this class.

Hierarchy

  • LoggerCache

Index

Methods

Static addTransport

Static get

  • get(key: string, fallback?: any): any
  • Gets a value from the LoggerCache, or default to the given fallback value if there is no value cached for the given key

    Parameters

    • key: string
    • Optional fallback: any

    Returns any

Static has

  • has(key: string): boolean
  • Returns whether or not the cache has a value for the given key

    Parameters

    • key: string

    Returns boolean

Static remove

  • remove(key: string): void
  • Removes a value from the LoggerCache

    Parameters

    • key: string

    Returns void

Static removeDefaultTransport

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

    Returns void

Static removeTransport

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

    Parameters

    • key: string

    Returns void

Static set

  • set(key: string, value: any): void
  • Sets a value in the LoggerCache

    Parameters

    • key: string
    • value: any

    Returns void

Static transports

Generated using TypeDoc