CustomJsonReplacerFn: (key: string, value: unknown) => unknown

A custom JSON replacer function that can be passed to the Logger constructor to extend the default serialization behavior.

By default, we already extend the default serialization behavior to handle BigInt and Error objects, as well as remove circular references. When a custom JSON replacer function is passed to the Logger constructor, it will be called before our custom rules for each key-value pair in the object being stringified.

This allows you to customize the serialization while still benefiting from the default behavior.

Type declaration

    • (key: string, value: unknown): unknown
    • Parameters

      • key: string

        The key of the value being stringified.

      • value: unknown

        The value being stringified.

      Returns unknown