Skip to content

Commit 468f6a9

Browse files
committed
fix(logging): "debug" messages not shown in "AWS Toolkit Logs" channel
Problem: `vscode.LogOutputChannel` loglevel is currently readonly: - microsoft/vscode#170450 - PowerShell/vscode-powershell#4441 So `debug()` will just drop messages unless the user has increased vscode's log-level. Solution: Write "debug" logs using `info()` until vscode adds a way to set the loglevel.
1 parent 549c826 commit 468f6a9

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/shared/logger/outputChannelTransport.ts

+6-1
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,12 @@ export class OutputChannelTransport extends Transport {
6464
} else if (loglevel === 'warn') {
6565
c.warn(msg)
6666
} else if (loglevel === 'debug' || loglevel === 'verbose') {
67-
c.debug(msg)
67+
// XXX: `vscode.LogOutputChannel` loglevel is currently readonly:
68+
// https://github.com/microsoft/vscode/issues/170450
69+
// https://github.com/PowerShell/vscode-powershell/issues/4441
70+
// So debug() will just drop messages unless the user has increased vscode's log-level.
71+
// Use info() until vscode adds a way to set the loglevel.
72+
c.info(msg)
6873
} else {
6974
c.info(msg)
7075
}

0 commit comments

Comments
 (0)