Comment

Comment by gabereiser

Didn't the Go team say that there's a logging interface and that's where they are going to leave it. If you want more robust logging, you can add it. log.New() is for that purpose. If you want a struct-log, you'll have to define one for your needs. Logging is very environment specific. What I log to the console locally is different from what I log to, say, AWS CloudWatch in production.

I think the stance on logging by the core Go team is the right way to go about it. Just provide a basic logger, an interface, and let the projects determine how they want to route those logs and what kind of data should it include.

parent gabereiser 4 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton