VS Code API
    Preparing search index...

    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: string): void;
        appendLine(value: string): void;
        clear(): void;
        debug(message: string, ...args: any[]): void;
        dispose(): void;
        error(error: string | Error, ...args: any[]): void;
        hide(): void;
        info(message: string, ...args: any[]): void;
        replace(value: string): void;
        show(preserveFocus?: boolean): void;
        show(column?: ViewColumn, preserveFocus?: boolean): void;
        trace(message: string, ...args: any[]): void;
        warn(message: string, ...args: any[]): void;
    }

    Hierarchy (View Summary)

    Index

    Properties

    logLevel: LogLevel

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

    name: string

    The human-readable name of this output channel.

    onDidChangeLogLevel: Event<LogLevel>

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

    Methods

    • Append the given value to the channel.

      Parameters

      • value: string

        A string, falsy values will not be printed.

      Returns void

    • Append the given value and a line feed character to the channel.

      Parameters

      • value: string

        A string, falsy values will be printed.

      Returns void

    • 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

      • ...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

      • ...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

      • ...args: any[]

      Returns void

    • Replaces all output from the channel with the given value.

      Parameters

      • value: string

        A string, falsy values will not be printed.

      Returns void

    • Reveal this channel in the UI.

      Parameters

      • OptionalpreserveFocus: boolean

        When true the channel will not take focus.

      Returns void

    • Reveal this channel in the UI.

      Parameters

      • Optionalcolumn: ViewColumn

        This argument is deprecated and will be ignored.

      • OptionalpreserveFocus: boolean

        When true the channel will not take focus.

      Returns void

      Use the overload with just one parameter (show(preserveFocus?: boolean): 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

      • ...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

      • ...args: any[]

      Returns void