5 ms·
UTC is great for timestamps, but he needs to make his times sortable (YYYY-MM-DD) Tab delimited fields are a problem, unless you escape the tabs inside the data
by Pfhreak 14y ago
UTC is great for timestamps, but he needs to make his times sortable (YYYY-MM-DD)
Tab delimited fields are a problem, unless you escape the tabs inside the data you log.
This format seems VERY similar to the Graylog Extended Log Format (or GELF) https://github.com/Graylog2/graylog2-docs/wiki/GELF https://github.com/Graylog2/graylog2-docs/wiki/GELF
I'm a huge fan of JSON logs now, having just finished implementing them on a major work project. Every language out there can take JSON in and do work against it, and there are some really awesome tools for rendering filtered logs to a browser in realtime.
- mseebach 14y ago> Tab delimited fields are a problem, unless you escape the tabs. I don't understand this? A tab is a tab? > JSON Downside: File size. If you have any appreciable level of traffic/activity this matters.
- eru 14y agoThey should compress well.
- Pfhreak 14y agoIn fact, they compress to about a 3% of their size. Since they really only exist in text file form for a limited period of time before being moved on to a separate logging system, their exploded size isn't much of a concern.
- lost-theory 14y ago> I don't understand this? A tab is a tab? How do you differentiate between tabs that the logger generates, and tabs inside log messages? You need to escape the tabs inside messages. This problem exists with any character delimited format (e.g. csv).
- adamzochowski 14y ago> I don't understand this? A tab is a tab? I think the parent meant that a problem could be if data itself contains a tab character, causing an offset during parsing.