Hacker News new | ask | show | jobs
by AYBABTME 4277 days ago
Colorized output by default will make for messy logs that can't be used. Sure you can turn it off (with an integer, why not a bool?), but that shouldn't be something compiled in your program. Also there are no means to `printf` strings from the logger.

Finally, there are already a plethora of loggers for Go. I'd recommend logrus for structured logs:

https://github.com/Sirupsen/logrus

Or glog otherwise.

And a note: a logger isn't a debugger. GDB is a debugger for Go, see https://golang.org/doc/gdb

Sorry if I come across as heartless, it's nice to see new people coming to Go. But I don't think this is novel or news worthy.