uber-go/zap ? reverse-engineered prompt

Reverse engineered prompt

Build me a blazing fast logging library for Go. It should focus on structured logging with support for different levels like info debug and error.

Give me two ways to use it. One is a simple SugaredLogger that feels like printf but also accepts loose key value pairs for context. The other is a strict Logger that takes typed fields for maximum speed and zero allocations.

Add a NewProduction function that sets up a good default for real apps along with a Sync method to flush logs. Make the whole thing dramatically faster than logrus or the standard library especially when logging lots of fields in hot paths. Throw in some examples and keep the API clean and stable.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab