ChemPal Documentation - v1.17.0
    Preparing search index...

    Interface RemoteLogSink

    A destination that receives log calls in addition to the console, such as PostHog Logs. isEnabled is checked first so a disabled level costs no more than one function call.

    • isEnabled - Whether records at this level are currently wanted.
    • emit - Receives a record. Must not throw.
    const sink: RemoteLogSink = {
    isEnabled: (level) => level === 'error',
    emit: (record) => queue.push(record),
    };
    Logger.setRemoteSink(sink);
    export interface RemoteLogSink {
    isEnabled(level: RemoteLogLevel): boolean;
    emit(record: RemoteLogRecord): void;
    }
    interface RemoteLogSink {
        isEnabled(
            level: "log" | "warn" | "error" | "fatal" | "trace" | "debug",
        ): boolean;
        emit(record: RemoteLogRecord): void;
    }
    Index

    Methods

    Methods

    • Parameters

      • level: "log" | "warn" | "error" | "fatal" | "trace" | "debug"

      Returns boolean