Skip to content

Add logging of loggingLevel#7807

Merged
Colengms merged 4 commits intomainfrom
coleng/log_loggingLevel
Jul 14, 2021
Merged

Add logging of loggingLevel#7807
Colengms merged 4 commits intomainfrom
coleng/log_loggingLevel

Conversation

@Colengms
Copy link
Contributor

@Colengms Colengms commented Jul 9, 2021

Addresses: #7796

outputChannel = vscode.window.createOutputChannel("C/C++");
const settings: CppSettings = new CppSettings();
const loggingLevel: string | undefined = settings.loggingLevel;
if (!!loggingLevel && loggingLevel !== "None" && loggingLevel !== "Error") {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you save the original logging level and re-output it if it's changed to a value that would affect a difference (i.e. switching from None to Error wouldn't matter)?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok. I'm not sure adding it also to Log Diagnostics would be useful. A user could potentially generate the Log Diagnostics from a different session than the output log, making the value unreliable.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What do you mean by "different session"? I was thinking if the user is in log gathering mode then there's a high probability the Log Diagnostics and C/C++ logging would be close in time, but there is a possibility they change the loggingLevel before or after they do the Log Diagnostics, so it wouldn't be 100% reliable, but could hint at what's probably happening if C/C++ logs appear to be missing info.

@sean-mcmanus
Copy link
Contributor

Also, would it be good to add the loggingLevel to the Log Diagnostics logging in cases where the users clear their log or only provide a subset of the C/C++ log?

@Colengms Colengms merged commit 11ed061 into main Jul 14, 2021
@Colengms Colengms deleted the coleng/log_loggingLevel branch July 14, 2021 18:58
@github-actions github-actions bot locked and limited conversation to collaborators Aug 29, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants