Keeta LogoKeeta Logo@keetanetwork/keetanet-client
    Preparing search index...

    Implements

    Index

    Constructors

    Properties

    batchSize: number = 10

    The maximum number of log entries to send to each target at a time

    ConsoleTarget: typeof LogTargetConsole = LogTargetConsole

    The Console target, which is a basic logging target that outputs logs to the console

    defaultLevel: LogTargetLevel = 'DEBUG'

    The default log level, used for new instances of the logger

    Methods

    • Dispose of the logger instance, clearing all logs and targets

      Returns void

    • Parameters

      • options: { currentRequestInfo?: LogCurrentRequest; userVisible?: boolean }
      • from: string
      • ...args: unknown[]

      Returns void

    • Parameters

      • from: string
      • ...args: unknown[]

      Returns void

    • Terminate the logger instance, clearing all logs and targets

      Returns void

    • Parameters

      • options: { currentRequestInfo?: LogCurrentRequest; userVisible?: boolean }
      • from: string
      • ...args: unknown[]

      Returns void

    • Parameters

      • from: string
      • ...args: unknown[]

      Returns void

    • Parameters

      • options: { currentRequestInfo?: LogCurrentRequest; userVisible?: boolean }
      • from: string
      • ...args: unknown[]

      Returns void

    • Parameters

      • from: string
      • ...args: unknown[]

      Returns void

    • Parameters

      • options: { currentRequestInfo?: LogCurrentRequest; userVisible?: boolean }
      • from: string
      • ...args: unknown[]

      Returns void

    • Parameters

      • from: string
      • ...args: unknown[]

      Returns void

    • Start a timer to periodically sync logs to all targets

      Parameters

      • rate: number = 100

      Returns void

    • If a timer was started with startAutoSync(), stop it

      Returns void

    • Sync all currently enqueued logs to all targets

      Returns Promise<void>

    • Unregister a logging target (sink) to stop sending logs to

      Parameters

      Returns void

    • Parameters

      • options: { currentRequestInfo?: LogCurrentRequest; userVisible?: boolean }
      • from: string
      • ...args: unknown[]

      Returns void

    • Parameters

      • from: string
      • ...args: unknown[]

      Returns void

    • The legacy logger

      This is a singleton instance of the logger that registers a console target that emits logs immediately to the console.

      This also sets the log level based on the <name>_DEBUG environment variable, if available and adds filtering based on the <name>_DEBUG_FILTER environment variable, if available.

      The default value for <name> is KEETANET.

      Parameters

      • Optionalname: string

      Returns Log

    • The Null logger, to disable logging entirely

      Returns Logger