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

Add logfire.warning to mirror stdlib logging.warning #793

Closed
JacobHayes opened this issue Jan 11, 2025 · 1 comment · Fixed by #800
Closed

Add logfire.warning to mirror stdlib logging.warning #793

JacobHayes opened this issue Jan 11, 2025 · 1 comment · Fixed by #800

Comments

@JacobHayes
Copy link
Contributor

Description

The standard library's logging module uses warning and deprecated warn. It'd be helpful to at least make warning available as logfire.warning and logfire.Logfire.warning.

This would make it a bit easier to write code that can accept either a logging.Logger or a logfire.Logfire instance (eg: library code or easier test injection).

I'm happy to submit a PR for this if you all are open to this. I see a prior commit replacing the usage of a warning method with warn, but I think the referenced PR was from a prior repo / before it was public, so I'm not sure if warning was removed intentional before.

@alexmojaki
Copy link
Contributor

This is a good point, a PR would be great, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants