Comunica
    Preparing search index...

    A bunyan-based logger implementation.

    Hierarchy (View Summary)

    Index

    Constructors

    Properties

    activeLogGroups: Record<
        string,
        { callback: (count: number) => void; count: number; lastSeenIndex: number },
    > = {}
    groupedLogLimit: 5
    repetitionCounter: number = 0
    LEVELS: Record<string, number> = ...

    All available logging levels.

    Methods

    • Log a message that might be repeated, preventing console spam. If the same key is passed multiple times, only the first time the emit callback will be invoked immediately. All subsequent calls will be buffered, until at least Logger#groupedLogLimit other logGrouped calls are made, or Logger#flush is called.

      Parameters

      • key: string

        A unique key for this message (e.g. the message template).

      • emit: (count: number) => void

        A callback to emit the message.

      Returns void

    • Convert a string-based logging level to a numerical logging level.

      Parameters

      • level: string

        A string-based logging level

      Returns number

      The numerical logging level, or undefined.