-
-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
[next] Update error logging #9129
Conversation
🦋 Changeset detectedLatest commit: a3f2214 The changes in this PR will be included in the next version bump. Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
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 PR is blocked because it contains a minor
changeset. A reviewer will merge this at the next release if approved.
'astro': minor | ||
--- | ||
|
||
Update error log formatting |
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.
We like to make these changesets a paragraph or two, like what would go in a blog post.
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.
In favor of this change! Glad we talked through it, thanks for scoping it back a bit.
@@ -20,7 +20,7 @@ export async function throwAndExit(cmd: string, err: unknown) { | |||
|
|||
const errorWithMetadata = collectErrorMetadata(createSafeError(err)); | |||
telemetryPromise = telemetry.record(eventError({ cmd, err: errorWithMetadata, isFatal: true })); | |||
errorMessage = formatErrorMessage(errorWithMetadata); | |||
errorMessage = formatErrorMessage(errorWithMetadata, true); |
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.
Non-blocking, but it'd be nice to move to an options object like { verbose: true }
or { showFullStacktrace: true }
to avoid an unlabelled boolean argument.
Changes
hint
to be more concise, that @Princesseuh and I had already audited together in Logging refresh #8833Result
This PR
Previously
^ didn't fit in my terminal! Once I dragged to expand and retake the screenshot:
Testing
N/A
Docs
N/A