Skip to content
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

Stacktrace formatter #19

Merged
merged 10 commits into from
Jan 16, 2025
Merged

Stacktrace formatter #19

merged 10 commits into from
Jan 16, 2025

Conversation

thebiglabasky
Copy link
Collaborator

Fixing #18 along the way, I integrated an adapted stacktrace formatter I played around with.

image image

@thebiglabasky thebiglabasky requested a review from iethree January 8, 2025 20:16
Copy link

vercel bot commented Jan 8, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
metabase-debugger ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 16, 2025 2:57am

@@ -77,6 +98,24 @@ const stripAnsiCodes = (text: string) => {
return text.replace(/\x1b\[\d+m/g, '')
}

const FrameLine: React.FC<FrameLineProps> = ({ line }) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Mostly made for conditionally surround it by a link or not

@@ -106,6 +145,115 @@ const LogsTable: React.FC<LogsTableProps> = ({ logs }) => {
[filteredLogs]
)

const prettyPrintClojure = (str: string) => {
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This one is there to format Clojure data structures that are part of the first error line, and don't nicely match a JSON format allowing for a friendlier formatting option. That ends up being shown like so
image

@thebiglabasky
Copy link
Collaborator Author

Nice thanks for making look good 😄

@thebiglabasky thebiglabasky merged commit ad90a9d into main Jan 16, 2025
5 checks passed
@thebiglabasky thebiglabasky deleted the stacktrace-formatter branch January 16, 2025 09:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants