logging - Limitations of GO lang log package -


i implementing logger in go. thinking of using logrus this. wanted understand limitations of built in log package.

i know if want write logs file or implement rolling file logs etc need add feature manually. there other limitations have choose external log package?

logging file using builtin log package not issue, can use log.setoutput() or logger.setoutput() set destination io.writer other default os.stderr, example file *os.file.

what's missing , whished leveled logging (e.g. info, warn, debug, error etc.). reasoning, read blog post dave cheney: let's talk logging.

you can't enforce specific log.logger used designated packages unless packages "willing" cooperate (e.g. provide setlogger() function).

rolling log files missing feature.

on other hand, it's easy "extend" standard logger log mongodb example, details see go: create io.writer inteface logging mongodb database. using mongodb can use capped collection implicitly give "rolling file" functionality.


Comments

Popular posts from this blog

php - How to add and update images or image url in Volusion using Volusion API -

javascript - jQuery UI Splitter/Resizable for unlimited amount of columns -

javascript - IE9 error '$'is not defined -