-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
Improve server error logging #13990
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
base: main
Are you sure you want to change the base?
Improve server error logging #13990
Conversation
|
Please tell me if I should delete the changes from the playground directory 🙂 |
@@ -105,7 +105,7 @@ export function walk(cwd, dirs = false) { | |||
} | |||
} | |||
|
|||
return (walk_dir(''), all_files); |
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.
Just the result of pnpm format
on packages/kit
, I didn't actually make any changes there.
Can you please update the PR title to more specifically describe how error logging is being improved? |
Partly resolves #13862.
This PR sanitizes stack trace for server errors by finding the last occurrence of "+page.", "+server.", or "+layout." in the stack trace, and removing everything that comes after that line.
Please don't delete this checklist! Before submitting the PR, please make sure you do the following:
Tests
As for the tests, I couldn't find a way to write Playwrite tests for the server logs. I dug up some similar tests, but they only test the error object itself, not the server log messages.
It seems like you can't easily listen on the server logs in Playwright, so if we really need it, I'd have to intercept the
console.log(...)
statements with something like this:pnpm test
and lint the project withpnpm lint
andpnpm check
Changesets
pnpm changeset
and following the prompts. Changesets that add features should beminor
and those that fix bugs should bepatch
. Please prefix changeset messages withfeat:
,fix:
, orchore:
.Edits