| ||Ask HN: Best practices for log format?|
137 points by user101010101 on Apr 27, 2017 | hide | past | web | favorite | 62 comments |
|We're currently going through a bikeshedding discussion about the log format that our microservices will generate.|
Developers without Ops responsibilities want the logs to be as readable as possible to aid their development process (traditional timestamp, severity, component, action and a quick description in a single line and, depending on the type of event, maybe a JSON object in many lines with details about the request, possibly with blank lines and indentation to make everything very easy to read).
Ops people want the files to be easily parseable for injection into ElasticSearch. They want to avoid complex configuration and want more flexibility to generate reports. If logs were generated in a single line in JSON format, they would be happy.
It seems there is no way to please everybody. Are there any standard formats that microservices-oriented architectures are using these days? Is there a standard at all? How to approach this?
| Apply to YC