Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> JSON format logs?

RFC 5424 syslog has a structured key=value component:

* https://datatracker.ietf.org/doc/html/rfc5424#section-6.3



I was wondering if I’m the only one who knows about this feature. In general, do people use syslog? I haven’t worked on a project that does.


I've used it in the past. I forget what the implementation of syslog was that we were using (I want to say it was rsyslog) but it didn't support the RFC above. There are two syslog formats, the one in that RFC, and an older one, IIRC "BSD syslog", which is worse.

So, if your implementation supports it.

But JSON is loads easier to emit and to build random parsers around.

In our case, syslog was then just upstreaming the logs as JSON to a more central collector, so we ended up just cutting it out of the loop.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: