Skip to content

Commit

Permalink
Document Out class
Browse files Browse the repository at this point in the history
  • Loading branch information
mark-wiemer committed Oct 29, 2024
1 parent 07edad8 commit e5078e9
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/common/out.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ import * as vscode from 'vscode';
export class Out {
private static outputChannel: vscode.OutputChannel;

/**
* Logs the given value without focusing the output view.
* Prepends all logs with `new Date().toISOString()`.
*/
public static debug(value: Error | string) {
Out.log(value, false);
}
Expand All @@ -12,6 +16,7 @@ export class Out {
* Logs the given value. Traces errors to console before logging.
* Prepends all logs with `new Date().toISOString()`.
* @param value The value to log
* @param focus whether to focus the output view. Defaults to true.
*/
public static log(value: Error | string, focus = true) {
if (value instanceof Error) {
Expand Down

0 comments on commit e5078e9

Please sign in to comment.