Interface LogOutputChannel

A channel for containing log output.

To get an instance of a LogOutputChannel use createOutputChannel.

interface LogOutputChannel {
    logLevel: LogLevel;
    name: string;
    onDidChangeLogLevel: Event<LogLevel>;
    append(value): void;
    appendLine(value): void;
    clear(): void;
    debug(message, ...args): void;
    dispose(): void;
    error(error, ...args): void;
    hide(): void;
    info(message, ...args): void;
    replace(value): void;
    show(column?, preserveFocus?): void;
    show(preserveFocus?): void;
    trace(message, ...args): void;
    warn(message, ...args): void;
}

Hierarchy (view full)

Implemented by

Properties

logLevel: LogLevel

The current log level of the channel. Defaults to editor log level.

name: string

The name of this output channel.

onDidChangeLogLevel: Event<LogLevel>

An Event which fires when the log level of the channel changes.

Methods

  • Outputs the given debug message to the channel.

    The message is only logged if the channel is configured to display debug log level or lower.

    Parameters

    • message: string

      debug message to log

    • Rest ...args: any[]

    Returns void

  • Outputs the given error or error message to the channel.

    The message is only logged if the channel is configured to display error log level or lower.

    Parameters

    • error: string | Error

      Error or error message to log

    • Rest ...args: any[]

    Returns void

  • Outputs the given information message to the channel.

    The message is only logged if the channel is configured to display info log level or lower.

    Parameters

    • message: string

      info message to log

    • Rest ...args: any[]

    Returns void

  • Reveal this channel in the UI.

    Parameters

    • Optional column: ViewColumn

      This argument is deprecated and will be ignored.

    • Optional preserveFocus: boolean

      When true the channel will not take focus.

    Returns void

    Deprecated

    Use the overload with just one parameter (show(preserveFocus?: boolean): void).

  • Reveal this channel in the UI.

    Parameters

    • Optional preserveFocus: boolean

      When true the channel will not take focus.

    Returns void

  • Outputs the given trace message to the channel. Use this method to log verbose information.

    The message is only logged if the channel is configured to display trace log level.

    Parameters

    • message: string

      trace message to log

    • Rest ...args: any[]

    Returns void

  • Outputs the given warning message to the channel.

    The message is only logged if the channel is configured to display warning log level or lower.

    Parameters

    • message: string

      warning message to log

    • Rest ...args: any[]

    Returns void