5 ms·
Show HN: Simplog – Simple logger with no dependencies written in 170 Lines of go
- ignoramous 7y agoNice work. I personally tend to favour zero-gc and fast loggers like this one: https://github.com/rs/zerolog https://github.com/rs/zerolog
- jhawkey 7y agoThanks! Sweet, hadn't heard about it until now. I am also considering implementing logging to json files. This just makes it much easier if another program wants to interpret/read the log.
- marvinblum 7y agoLooks like the one I've written for Emvi [1]. Does yours support logging to different channels? Like os.Stdout and os.Stderr? Because I couldn't find a large popular one that did support this. logrus for example rejected it, which is ridiculous in my eyes as it's very common to log to these channels. If you deal with Stacktrace logging on Google Cloud for example and use logrus, everything, really everything, went into the "error" level. [1] https://github.com/emvi/logbuch https://github.com/emvi/logbuch
- jhawkey 7y agoGreat project! Currently no. Currently the logger really only writes to files unless you activate the 'verbose' mode, in which case the output is written to both the log file and stdout. Supporting other channels should be easy to implement. Contributions are welcome of course :)