Options
All
  • Public
  • Public/Protected
  • All
Menu

Class POSTLogger

POSTLogger publishes log messages in batches to a URL supplied during its construction.

Be sure to call POSTLogger.destroy when you're done with the logger in order to avoid leaks.

Hierarchy

  • POSTLogger

Implements

Index

Constructors

constructor

Properties

metadata

metadata: Record<string, string>

Methods

addEventListener

  • addEventListener(): void

debug

  • debug(debugFunction: string | (() => string)): void
  • Calls [[debugFunction]] only if the log level is debug and emits the resulting string. Use the debug level to dump large or verbose messages that could slow down performance.

    Parameters

    • debugFunction: string | (() => string)

    Returns void

destroy

  • destroy(): Promise<void>

error

  • error(msg: string): void

getLogCaptureSize

  • getLogCaptureSize(): number

getLogLevel

info

  • info(msg: string): void

removeEventListener

  • removeEventListener(): void

setLogLevel

warn

  • warn(msg: string): void
  • Emits a warning message if the log level is equal to or lower than warn level.

    Parameters

    • msg: string

    Returns void

Generated using TypeDoc