-
Notifications
You must be signed in to change notification settings - Fork 37.7k
add notification if tsserver logs are left on for more than 7 days #124149
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
extensions/typescript-language-features/src/typescriptServiceClient.ts
Outdated
Show resolved
Hide resolved
extensions/typescript-language-features/src/typescriptServiceClient.ts
Outdated
Show resolved
Hide resolved
extensions/typescript-language-features/src/typescriptServiceClient.ts
Outdated
Show resolved
Hide resolved
extensions/typescript-language-features/src/typescriptServiceClient.ts
Outdated
Show resolved
Hide resolved
|
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
left a comment
There was a problem hiding this 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
extensions/typescript-language-features/src/typescriptServiceClient.ts
Outdated
Show resolved
Hide resolved
extensions/typescript-language-features/src/typescriptServiceClient.ts
Outdated
Show resolved
Hide resolved
extensions/typescript-language-features/src/typescriptServiceClient.ts
Outdated
Show resolved
Hide resolved
extensions/typescript-language-features/src/typeScriptServiceClientHost.ts
Outdated
Show resolved
Hide resolved
| // 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. |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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
|
Updated with the changes. I just have the one last question, commented inline. |
mjbvz
left a comment
There was a problem hiding this 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. |
There was a problem hiding this comment.
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
|
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 |
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.