TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Always Log JSON

3 pointsby Hedjaalmost 7 years ago

1 comment

badrabbitalmost 7 years ago
Nothing against json but I disagree with that conclusion.<p>There are tools that support only syslog for example.<p>Sometimes your aim is to log a large number of events,sometimes you want to log a lot but with less frequency. Syslog or maybe even binary logging might make sense for high volume events due to how the extra json formatting adds up quickly (and that could have a financial cost to it!!). If you want to log a lot of events but the frequency needs to be low due to resource constraints,then json may or may not add to your problem. It may be a problem as an intrmediate format but not so much if the final processed log is also json. If the resource bottleneck is caused by the log processing stage then there almost certainly be a better format. But I am not speaking strictly of JS code like the author.
评论 #17481792 未加载