-
Notifications
You must be signed in to change notification settings - Fork 472
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
feat(beta): force debug/verbose logging for Beta users #6033
Conversation
This comment was marked as resolved.
This comment was marked as resolved.
@@ -120,6 +123,9 @@ export class ToolkitLogger extends BaseLogger implements vscode.Disposable { | |||
} | |||
|
|||
override sendToLog(level: LogLevel, message: string | Error, ...meta: any[]): number { | |||
// XXX: force debug/verbose logs for Beta users. | |||
level = this.isBeta ? 'info' : level |
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.
I'm not familiar with this code so I can't tell if i'm missing something, but isn't this saying if its beta then use info? I thought we wanted verbose/debug if its beta users
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.
It forces the "sinks" (log providers such as Output channel, file, etc.) to log at "info" level. This forces the vscode Output channel to show logs that it would otherwise hide.
This is a hack because currently the vscode API doesn't give a way to programmatically set the Output channel log-level.
Pushed an improvement/fix: 87eebd4
Problem: Beta and bug-bash users often need logs. Solution: Log debug/verbose messages at "info" log-level. They will appear as "info" logs in the Output channel, even though they were logged at "debug" or "verbose" level.
import { isReleaseVersion } from '../shared/vscode/env' | ||
import { getRelativeDate } from '../shared/datetime' | ||
|
||
const localize = nls.loadMessageBundle() | ||
const logger = getLogger('dev/beta') | ||
|
||
const downloadIntervalMs = 1000 * 60 * 60 * 24 // A day in milliseconds | ||
const downloadIntervalMs = 1000 * 60 * 60 * 3 // 3 hours (8 times/day). |
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.
increase frequency
Problem
Beta and bug-bash users often need logs.
Solution
Log debug/verbose messages at "info" log-level. They will appear as "info" logs in the Output channel, even though they were logged at "debug" or "verbose" level.
Related
https://github.com/aws/aws-toolkit-vscode-staging/pull/1961 confirms CI behavior in a beta branch.
License: I confirm that my contribution is made under the terms of the Apache 2.0 license.