Skip to content

Commit d434294

Browse files
authoredJan 16, 2024
fix(logging): no "debug" messages in "AWS Toolkit Logs" channel #4289
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 d434294

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)
Please sign in to comment.