Skip to content

Commit

Permalink
use a log channel instead of a channel
Browse files Browse the repository at this point in the history
  • Loading branch information
baileympearson committed Nov 28, 2023
1 parent 25fa671 commit 4174656
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/logging.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,10 @@ import * as vscode from 'vscode';
import util from 'util';

class Logger implements ILogger {
static channel: vscode.OutputChannel =
vscode.window.createOutputChannel('MongoDB Extension');
static channel: vscode.LogOutputChannel = vscode.window.createOutputChannel(
'MongoDB Extension',
{ log: true }
);

private name: string;

Expand All @@ -30,7 +32,9 @@ class Logger implements ILogger {
public info(message?: any, ...optionalParams: any[]): void {
this.append(
'INFO ',
`${message} ${optionalParams ? util.inspect(optionalParams) : ''}`
`${message} ${
optionalParams ? util.inspect(optionalParams, { depth: Infinity }) : ''
}`
);
}

Expand Down

0 comments on commit 4174656

Please sign in to comment.