libp2p
    Preparing search index...

    Interface LoggerOptions

    interface LoggerOptions {
        onLog?(...args: any[]): void;
    }

    Hierarchy (View Summary)

    Index

    Methods

    Methods

    • Receives log lines. The default transport writes the log line to process.stderr, console.debug or console.log depending on what is available in the environment.

      The args are not formatted - they can be passed to util.format from Node.js or to format exported from this module as weald/format.

      Parameters

      • ...args: any[]

      Returns void

      import debug from 'weald'
      import { format } from 'weald/format'

      const logger = debug('my-namespace', {
      onLog (...args: any[]) {
      const line = format(...args)
      // do something with `line`
      }
      })