A channel for containing log output.

To get an instance of a LogOutputChannel use {@link window.createOutputChannel createOutputChannel}.

Variables

read onlylogLevel:LogLevel

The current log level of the channel. Defaults to {@link env.logLevel editor log level}.

read onlyonDidChangeLogLevel:Event<LogLevel>

An {@link Event} which fires when the log level of the channel changes.

Methods

debug(message:String, args:Rest<Any>):Void

Outputs the given debug message to the channel.

The message is only logged if the channel is configured to display {@link LogLevel.Debug debug} log level or lower.

Parameters:

message

debug message to log

error(error:EitherType<String, Error>, args:Rest<Any>):Void

Outputs the given error or error message to the channel.

The message is only logged if the channel is configured to display {@link LogLevel.Error error} log level or lower.

Parameters:

error

Error or error message to log

info(message:String, args:Rest<Any>):Void

Outputs the given information message to the channel.

The message is only logged if the channel is configured to display {@link LogLevel.Info info} log level or lower.

Parameters:

message

info message to log

trace(message:String, args:Rest<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 {@link LogLevel.Trace trace} log level.

Parameters:

message

trace message to log

warn(message:String, args:Rest<Any>):Void

Outputs the given warning message to the channel.

The message is only logged if the channel is configured to display {@link LogLevel.Warning warning} log level or lower.

Parameters:

message

warning message to log

Inherited Variables

Defined by OutputChannel

name:String

The human-readable name of this output channel.

Inherited Methods

Defined by OutputChannel

append(value:String):Void

Append the given value to the channel.

Parameters:

value

A string, falsy values will not be printed.

appendLine(value:String):Void

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

Parameters:

value

A string, falsy values will be printed.

clear():Void

Removes all output from the channel.

dispose():Void

Dispose and free associated resources.

hide():Void

Hide this channel from the UI.

replace(value:String):Void

Replaces all output from the channel with the given value.

Parameters:

value

A string, falsy values will not be printed.

show(?preserveFocus:Bool):Void

show(?column:ViewColumn, ?preservceFocus:Bool):Void

Reveal this channel in the UI.

Parameters:

preserveFocus

When true the channel will not take focus.