runsystemid/golog ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Go logging library for backend services that makes it easy to standardize log output across different apps.

I want one simple setup step where I pass in app name, version, environment, file locations, file size limits, backup limits, age limits, and whether logs should also go to the console. After that, I want to be able to call things like Info, Warn, Debug, Error, Fatal, and Panic from anywhere in the service. Error logs should accept an error value too.

Please make it support normal system logs and a separate TDR style log, and make sure logs can be written to file with automatic rotation when they get too large. If stdout is enabled, it should print there as well. Use context values like traceId, srcIP, port, and path so log entries are easier to trace.

Keep it clean, easy to import, and simple enough for other Go services to plug in quickly. If you need to check current Go logging patterns or docs, look them up online.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab