Skip to content

add notification if tsserver logs are left on for more than 7 days - #124149

Merged
Matt Bierner (mjbvz) merged 6 commits into
microsoft:mainfrom
nrayburn-tech:fix-123493
May 26, 2021
Merged

add notification if tsserver logs are left on for more than 7 days#124149
Matt Bierner (mjbvz) merged 6 commits into
microsoft:mainfrom
nrayburn-tech:fix-123493

Conversation

@nrayburn-tech

Copy link
Copy Markdown
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.

Comment thread extensions/typescript-language-features/src/typescriptServiceClient.ts Outdated
Comment thread extensions/typescript-language-features/src/typescriptServiceClient.ts Outdated
Comment thread extensions/typescript-language-features/src/typescriptServiceClient.ts Outdated
Comment thread extensions/typescript-language-features/src/typescriptServiceClient.ts Outdated
@nrayburn-tech

Copy link
Copy Markdown
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?

@mjbvz Matt Bierner (mjbvz) left a comment

Copy link
Copy Markdown
Contributor

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

Comment thread extensions/typescript-language-features/src/typescriptServiceClient.ts Outdated
Comment thread extensions/typescript-language-features/src/typescriptServiceClient.ts Outdated
Comment thread extensions/typescript-language-features/src/typescriptServiceClient.ts Outdated
Comment thread extensions/typescript-language-features/src/typeScriptServiceClientHost.ts Outdated
// 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
Copy Markdown
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
Copy Markdown
Contributor

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
Copy Markdown
Contributor Author

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

@mjbvz Matt Bierner (mjbvz) left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown
Contributor

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
Matt Bierner (mjbvz) marked this pull request as ready for review May 26, 2021 16:54
@mjbvz
Matt Bierner (mjbvz) merged commit c538781 into microsoft:main May 26, 2021
@mjbvz

Copy link
Copy Markdown
Contributor

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 Matt Bierner (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