Skip to content

Conversation

@nrayburn-tech
Copy link
Contributor

If the typescript server logs are enabled for more than 7 days, then a notification is displayed with an option to disable.

I can make a few more improvements, but I just wanted to make sure I was making the changes in the appropriate area.

This PR fixes #123493.

@nrayburn-tech
Copy link
Contributor Author

Updated and I think resolves all of the things you mentioned. I left a few todo comments about some things that I am not sure about.

Is there an easy way to update values inside of the extension context global state? Is it stored in a json file that I can open and set the value in, or is it just easier to write something and use the vscode api?

Copy link
Collaborator

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

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

Looking good overall, I just have a few minor suggestions

// TODO: Should the fallback for this be 0, or new Date()?
// 0 Means every user that has logging enabled currently will be notified.
// new Date() means that users will not be notified until they have changed their
// logging setting at least once.
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This is the last thing I was unsure about.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's use zero to notify existing users who have logging enabled but don't have a value for LogLevelMonitor.logLevelChangedStorageKey

@nrayburn-tech
Copy link
Contributor Author

Updated with the changes. I just have the one last question, commented inline.

Copy link
Collaborator

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

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

Looks good, just remove the todo comment and I'll merge this!

// TODO: Should the fallback for this be 0, or new Date()?
// 0 Means every user that has logging enabled currently will be notified.
// new Date() means that users will not be notified until they have changed their
// logging setting at least once.
Copy link
Collaborator

Choose a reason for hiding this comment

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

Let's use zero to notify existing users who have logging enabled but don't have a value for LogLevelMonitor.logLevelChangedStorageKey

@mjbvz mjbvz marked this pull request as ready for review May 26, 2021 16:54
@mjbvz mjbvz merged commit c538781 into microsoft:main May 26, 2021
@mjbvz
Copy link
Collaborator

mjbvz commented May 26, 2021

Thanks! Great work on this PR

This will be in the next VS Code insiders build and is scheduled to be released with VS Code 1.57

@mjbvz mjbvz added this to the May 2021 milestone May 26, 2021
@github-actions github-actions bot locked and limited conversation to collaborators Jul 10, 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.

Suggest switching off TSServer Trace Logs if left on for a long time

3 participants