Libraries
    Preparing search index...

    Variable SelfLogConst

    SelfLog: {
        _enabled: boolean;
        _output: { write(s: string): void } | null;
        disable(): void;
        enable(): void;
        setOutput(output: { write(s: string): void }): void;
        write(message: string, error?: unknown): void;
    } = ...

    Internal diagnostic channel for the logging library's own errors.

    Sinks use this when they fail, instead of throwing and crashing the application. By default writes to process.stderr.

    Type Declaration

    • _enabled: boolean
    • _output: { write(s: string): void } | null
    • disable: function
    • enable: function
    • setOutput: function
      • Sets a custom output stream for self-diagnostics.

        Parameters

        • output: { write(s: string): void }

          writable stream with a write method

        Returns void

    • write: function
      • Writes an internal diagnostic message. Includes optional error details.

        Parameters

        • message: string

          diagnostic message

        • Optionalerror: unknown

          optional associated error

        Returns void

    SelfLog.setOutput(fs.createWriteStream('./logs/selflog.txt'));
    SelfLog.disable();