Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Hi there! I’m in love with your zero allocation implementation since I’m a big fan of Span and stackalloc 😃 I was in the process of doing that myself and stumble upon your great framework. And then I had a thought: It would be super great to have a ZeroLog.Core nuget implementing the core of a logging framework, then all the existing logging framework could re-implement their string management with this package and boom, you made the world sustainable again!

Issue Analytics

  • State:closed
  • Created a year ago
  • Comments:6 (3 by maintainers)

github_iconTop GitHub Comments

ltrzesniewskicommented, Aug 4, 2022

Actually, it doesn’t emit IL at runtime. v1 did that, but we removed it in v2.

The IL you see is “emitted” at compile time (see

ltrzesniewskicommented, Aug 4, 2022

Well, in that case, I think ZeroLog already does what you want. 🙂

You can consider its primary job is the first point you mention, but it is still designed to be extensible (your second point):

  • You can supply your own appender that derives from ZeroLog.Appenders.Appender (or StreamAppender) if you need to add a new sink.
  • You can supply your own formatter ZeroLog.Formatting.Formatter if you need another log format. We may implement logfmt or ndjson formats in the future.

As for your first point, there are a few ways to extend it as well:

  • You can write extension methods on LogMessage for your own types (we have a few of those in our codebase).
  • You can use an LogMessage.AppendOperation<T> in interpolated strings.

That’s something I should document I suppose. 🙂

Read more comments on GitHub >

github_iconTop Results From Across the Web

obsidiandynamics/zerolog: Low-overhead logging façade ...
Zerolog (abbreviated to Zlg) is a logging façade with two fundamental design ... You need the zerolog-core module and, typically, a binding module....
Read more >
ZeroLog 2.1.0
Version Downloads Last updated 2.1.0 1,649 6 months ago 2.1.0‑pre3 119 6 months ago 2.1.0‑pre2 213 7 months ago
Read more >
Package zerolog provides a lightweight logging library dedicated to JSON ... The zerolog package provides a fast and simple logger dedicated to JSON...
Read more >
Why I Chose Zerolog Over Logrus for Go Logging : r/golang
Zerolog is a logging library that is designed to be fast, lightweight, and easy to use. It has a simple API that allows...
Read more >
Artifacts using Zerolog Core (8)
Artifacts using Zerolog Core (8) · 1. Blackstrom Core5 usages · 2. Meteor Common2 usages · 3. Zerolog Bridge Hazelcast2 usages · 4....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found