rs/zerolog — reverse-engineered prompt

Reverse engineered prompt

Build me a really fast structured logger for Go that writes compact JSON by default and feels simple to use in everyday app code. I want the main experience to be easy things like info, debug, warn, error, and fatal logs, plus adding typed fields such as strings, numbers, timestamps, and errors without a lot of boilerplate. It should support a nice chained style, global log level control, contextual fields that can be attached once and reused, and safe integration with context and regular HTTP handlers so request data can flow into logs.

Please also include a readable console output mode for local development, while keeping JSON as the normal production output. I want error logging to work well, including optional stack traces, plus extras like hooks, log sampling, and an option for a binary encoding format too. If possible, make it very performance focused with little to no allocation overhead, and include examples, tests, and a small benchmark so it is clear how to use and validate it. You can look up current docs online if needed.

Want more depth? Deep Reverse