Skip to content

Ensure full flush on panic #39

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

Open
davidhewitt opened this issue Mar 27, 2025 · 1 comment
Open

Ensure full flush on panic #39

davidhewitt opened this issue Mar 27, 2025 · 1 comment

Comments

@davidhewitt
Copy link
Contributor

At the moment we have the ShutdownHandler type returned from logfire.configure(), which needs to have .shutdown() called at the end of the program to flush. Usually one does this at the end of main.

This won't run if the whole stack is unwound with a panic. We should probably use a guard pattern so that panics are fully exported before exiting the process.

@davidhewitt
Copy link
Contributor Author

cc @cetra3

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

No branches or pull requests

1 participant