3 ms·
> ...isn't all garbagy like XML... I don't think it's fair to take something that isn't garbagy at all and then say that the proposed alternative isn't bad bec
by thaumaturgy 15y ago
> ...isn't all garbagy like XML...
I don't think it's fair to take something that isn't garbagy at all and then say that the proposed alternative isn't bad because it's not as garbagy as one of the garbagiest things ever invented. :-)
JSON may not be as garbagy as XML, but it's still garbagy. With logs in their current format, often my very first tool in log analysis is the scroll wheel on my mouse. It's so lovely because all the lines are unbroken, the columns line up so neatly, and the data in the columns are so distinct from each-other. JSON dicks all that up.
Now, OK, I'll admit it wouldn't be very hard for me to whip up something that will take a JSON-formatted log and turn it into something I actually want to read. And in fact that's exactly what I'd end up doing.
But, logs are already getting big enough that some companies are doing very stupid things to them. (Bluehost, by default, logs only the last 24 hours for all hosted sites; if you turn on their "extended" logs feature, their logs still have huge gaps in them.) JSON makes that problem a lot worse for those companies. And, if their log rotation isn't set up correctly -- and if they're doing vhosting I'll bet you a donut it's not -- then what would have been a silly amount of data to process now becomes nearly impossible to process.
- CoffeeDregs 15y ago>> ...isn't all garbagy like XML... >I don't think it's fair to take something that isn't garbagy at all >and then say that the proposed alternative isn't bad because it's not as >garbagy as one of the garbagiest things ever invented. :-) I can see how what I wrote could be interpreted to say "JSON is a little garbagy", but I didn't mean to imply that JSON is at all garbagy. In fact, in comparison to the standard web log, it's very readable. Further, as a dev, I read web logs pretty frequently and I've forgotten what the "- -" was in the log line I pasted... EDIT: hey, I ignored most of your reply and that's rude: My first tool for debugging Apache is 'less', so I would be screaming and yelling if JSON logs were harder to read than non-JSON logs. Agreed about the size of the logs, but JSON logging seems to only change the caliber of the handgun used to shoot yourself in the foot, not turn it into a Howitzer.