Skip to content

Add logfmter#2974

Merged
JinyangWang27 merged 2 commits intovinta:masterfrom
josheppinette:add-logfmter-logging-library
Mar 26, 2026
Merged

Add logfmter#2974
JinyangWang27 merged 2 commits intovinta:masterfrom
josheppinette:add-logfmter-logging-library

Conversation

@josheppinette
Copy link
Copy Markdown
Contributor

@josheppinette josheppinette commented Mar 18, 2026

Project

logfmter

Checklist

  • One project per PR
  • PR title format: Add project-name
  • Entry format: * [project-name](url) - Description ending with period.
  • Description is concise and short

Why This Project Is Awesome

Which criterion does it meet? (pick one)

  • Industry Standard - The go-to tool for a specific use case
  • Rising Star - 5000+ stars in < 2 years, significant adoption
  • Hidden Gem - Exceptional quality, solves niche problems elegantly

Explain:

How It Differs

Logfmter is the only standard library compatible logfmt logging formatter which requires zero changes to your logging calls. The project has been actively maintained for 4+ years and has 101 stars on GitHub.

@josheppinette josheppinette force-pushed the add-logfmter-logging-library branch 3 times, most recently from 93f17e4 to 1f031a6 Compare March 20, 2026 14:00
@josheppinette
Copy link
Copy Markdown
Contributor Author

@vinta I have rebased this pull request against your recent changes, so its all ready to go. Your updates are looking great!

@josheppinette josheppinette force-pushed the add-logfmter-logging-library branch from 1f031a6 to e74ab33 Compare March 21, 2026 19:19
@JinyangWang27
Copy link
Copy Markdown
Collaborator

@josheppinette Sorry for the delayed response — I've been spending some time looking at this project in detail. The API is clean and focused: a single Formatter subclass, zero dependencies, and genuine drop-in compatibility with stdlib logging. The cross-ecosystem compatibility tests against Go's logfmt parser are a nice touch. It fills a real niche for teams that want logfmt output without committing to a full framework like structlog.

A few concerns worth noting, though none are blockers:

  • Versioning: The project has been actively maintained since early 2022 with 12 releases, but it's still at 0.0.12. That makes it harder for downstream users to reason about stability and breaking changes (e.g., dropping Python 3.9 happened within a patch bump). A move toward semver 1.x would better reflect the project's actual maturity.

  • Thread-safe context propagation: Perhaps I'm wrong. The defaults parameter is static. Users must manually pass extra={} on every call or resort to log record factories — so it pushes complexity to the users?

  • Metadata: The project still uses setup.cfg + setup.py for package metadata, with pyproject.toml only for tool config. Migrating to PEP 621 declarative metadata in pyproject.toml would modernize the packaging story.

@JinyangWang27 JinyangWang27 merged commit bddb692 into vinta:master Mar 26, 2026
@josheppinette
Copy link
Copy Markdown
Contributor Author

@JinyangWang27 Thanks for the excellent feedback! Agree with all of your comments.

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