Skip to content

Commit 97093cf

Browse files
committed
remove console.log channel wrapper
doesn't work
1 parent 068ad7c commit 97093cf

File tree

1 file changed

+8
-17
lines changed

1 file changed

+8
-17
lines changed

src/outputChannel.ts

Lines changed: 8 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -7,22 +7,13 @@ type Logger = {
77
};
88

99
export function getLogger(): Logger {
10-
// TODO: hack to support logging in and out of vscode context
11-
try {
12-
if (channel === undefined) {
13-
channel = vscode.window.createOutputChannel("CodeBlocks");
14-
}
15-
16-
return {
17-
log: (message: string): void => {
18-
channel?.appendLine(message);
19-
},
20-
};
21-
} catch (error) {
22-
return {
23-
log: (message: string): void => {
24-
console.log(message);
25-
},
26-
};
10+
if (channel === undefined) {
11+
channel = vscode.window.createOutputChannel("CodeBlocks");
2712
}
13+
14+
return {
15+
log: (message: string): void => {
16+
channel?.appendLine(message);
17+
},
18+
};
2819
}

0 commit comments

Comments
 (0)