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

Evaluate structlog and loguru #128

Closed
daryllimyt opened this issue May 3, 2024 · 0 comments
Closed

Evaluate structlog and loguru #128

daryllimyt opened this issue May 3, 2024 · 0 comments
Assignees
Labels
engine enhancement New feature or request

Comments

@daryllimyt
Copy link
Contributor

daryllimyt commented May 3, 2024

Evaluation

Resources used

Breakdown

Function Loguru Structlog
Attach structured context Yes, call .bind or .contextualize to attach variables Yes, call .bind
Add new logger Call .add Likely some additional config
Colored logs Yes Yes
Setup complexity Low, literally just use one logger Mid-High , requires creation of pipeline-like object with processors applied onto the logger
f-string syntax Yes No
JSON logs Yes, use serialize Yes, use processor
Structured exceptions/traces No Yes
Exception diagnostics Yes, use diagnose flag No
Async-Await syntax compatibility ? Available

Verdict

Loguru appears simpler to get started with. Structlog apparently needs more config before it's actually usable.

They mostly offer the same features but loguru is more featureful.

-> going with Loguru

@daryllimyt daryllimyt mentioned this issue May 3, 2024
33 tasks
@daryllimyt daryllimyt added enhancement New feature or request engine labels May 3, 2024
@daryllimyt daryllimyt self-assigned this May 3, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
engine enhancement New feature or request
Projects
Status: Done
Development

No branches or pull requests

1 participant