@awalsh128/winston-vscode
    Preparing search index...

    Interface Host

    Everything the shared logger needs from the host it runs in. Each adapter implements it for its host and never makes the shared package import the host's API.

    interface Host {
        createTransport(format: Format): TransportStream;
        getLevel(): LogLevelOrOff;
        onLevelChange?(listener: (level: LogLevelOrOff) => void): Disposable;
        dispose?(): void;
    }
    Index
    • Creates the transport that writes the host's lines: to an output channel, the workflow log, and so on. Runs once, when the logger is created.

      Parameters

      • format: Format

        The format for the transport to use, made from the logger's format option.

      Returns TransportStream

    • The level the host wants right now. Read once when the logger is created.

      Returns LogLevelOrOff

    • Reports level changes made by the host while the logger lives, such as a user changing the log level. Leave it out when the host's level never changes.

      Parameters

      Returns Disposable

      A subscription that stops the reports.

    • Releases what the host adapter holds, such as an output channel. Runs on logger disposal.

      Returns void