Hacker News new | ask | show | jobs
by notheguyouthink 2887 days ago
For me, the biggest thing in logging these days is being able to remove performance impact of logs lower than the level threshold. How does this library compare?

Currently I'm using Zerolog, which has a nice compromise of UX, performance and adoption. The less cost the better if my application logs with a level that is not enabled.

1 comments

Hi, thank you for the feedback.

For the moment, it stands between logrus and zerolog/zap in term of speed/allocation.

For a message with 10 fields, zerolog does 6 allocs, astroflow 13 and logrus 54, but the UX is far better than zerolog (IMO).

OTH there is no cost (only 1 if comparison) if the level is not enabled.

In a near future the same mechanism as in zeolog will be implemented which enable to reduce allocations in tradeoff of writing more verbose code.