Onelog - dead simple, very fast, zero allocation JSON logger

Hi folks,

Just released Onelog, a very efficient simple to use JSON logger. It uses GoJay’s encoder internally, wrapping it to make it easier to use.

API is different than most common go loggers but it is very efficient, please let me know what you think of it and if you feel it make sense to addd an API such as:

logger.
    Entry().
    Info("message").
    String("test", "test").
    Write()

Thanks for your feedbacks

1 Like

You should link to the benchmark code somewhere. I just glanced at the readme, and passing a closure for extra fields does not feel like it ought to be zero allocations to me. (Perhaps it is in the benchmark because the passed function only uses constants so doesn’t close over anything?)

That’s cool. I was sure creating a closure would be an allocation, but apparently it’s not in at least the simple cases I tried out now. :+1:

(This thread appears to be marked as spam by someone; not sure why.)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.