Open JustinGrote opened 1 week ago
I dug into this a little bit further:
It appears to be due to an interaction between three settings locations:
Set Log Level
command and top list)Set Log Level
command and middle list or by output pane "Gear" dropdownlog-level
for the extensionIf an extension has multiple output panes, using Set as Default
sets it for all of them, which is not ideal behavior. It is also observed that, if it is set in argv.json
via Set as Default
, it seems to break the logic and always sets the output pane to info even though its individual display says otherwise.
Does this issue occur when all extensions are disabled?: Yes/No
Reproduction
Relevant Code: https://github.com/JustinGrote/vscode-extension-issues/blob/issue/logOutputWindowTraceChange/src/extension.ts
Expected
A
LogOutputChannel
starts with thelogLevel
that the user preference has specifiedActual
Always starts at
Info
and gets set sometime later, however logs seem to filter normally.EDIT: This only happens if the default log level and the output pane log level are not the same, and "Set as Default" has not been used to modify the
argv.json
. If default log level and output pane log level are the same, the ondidChange does not fire later and the startup log level is correct.https://github.com/user-attachments/assets/f7e53748-d024-40cf-a8cb-b47eb7418a0d
Relevance
I have a custom logger that relies on checking the logLevel and do a noop if it does not meet the required level.
Potential Fixes
info
, so a spurious onDidChangeLogLevel for info as well would also suffice.