5 ms·
I could go either way on making it optional. I try to avoid configuration complexity and the log format is a piece of complexity that can be removed from your
by jrockway 4y ago
I could go either way on making it optional. I try to avoid configuration complexity and the log format is a piece of complexity that can be removed from your application with post-processing.
For example, I wrote opinionated-server which lets you pick text or JSON logging. Even though it has text logging, when I'm developing a server locally, I just pipe the JSON through jlog because I have super-refined that format to my personal tastes, whereas zap's builtin text format isn't as nice.
But I will say that when I create loggers for unit tests, I use the text formatter if one is available. I have never been interested in parsing JSON logs interspersed among plain text (though it is totally very possible to do).