Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface LogOutputChannel

A channel for containing log output.

To get an instance of a LogOutputChannel use createOutputChannel.

Hierarchy

Index

Properties(3)

Readonly name

name: string

The human-readable name of this output channel.

Readonly logLevel

logLevel: LogLevel

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

Readonly onDidChangeLogLevel

onDidChangeLogLevel: Event<LogLevel>

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

Methods(12)

append

  • append(value: string): void
  • Append the given value to the channel.

    Parameters

    • value: string

      A string, falsy values will not be printed.

    Returns void

appendLine

  • appendLine(value: string): 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

replace

  • replace(value: string): void
  • Replaces all output from the channel with the given value.

    Parameters

    • value: string

      A string, falsy values will not be printed.

    Returns void

clear

  • clear(): void

show

  • show(preserveFocus?: boolean): void
  • show(column?: ViewColumn, preserveFocus?: boolean): void
  • Reveal this channel in the UI.

    Parameters

    • Optional preserveFocus: boolean

      When true the channel will not take focus.

    Returns void

  • Reveal this channel in the UI.

    deprecated

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

    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

hide

  • hide(): void

dispose

  • dispose(): void

trace

  • trace(message: string, ...args: any[]): 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

debug

  • debug(message: string, ...args: any[]): 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

    • Rest ...args: any[]

    Returns void

info

  • info(message: string, ...args: any[]): 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

warn

  • warn(message: string, ...args: any[]): 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

error

  • error(error: string | Error, ...args: any[]): 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

Generated by TypeDoc. Maintained by 洛竹