5 ms·
Ask HN: How do you manage logging in a large application?
We have a large angular web application that has grown into a big mess of console.log() output and it's now unmanageable.
What are some good strategies to do this? Ideally we want to be able to turn logging for components on/off at run-time (during development).
- mister_hn 7y agoRely on logstash/Elastic stack, especially if logs are massive
- 2rsf 7y agoSame here, you'd be amazed what can be done with smart searches
- GFischer 7y agoI'm using Application Insights, but our tool is very Microsoft-centric. Standard recommendation like mister_hn said is Elastic stack, Logstash and Kibana or Grafana. In a course, I also saw recommended Zipkin and Jaeger.
- tcbasche 7y agoNot too sure about Angular / JS, but instead of console.log() I'd use something that you can determine a log level for i.e. console.error / console.info / console.debug. Then you can determine what to ship out to a logging tool like logstash/logdna based on the environment. Edit: Something like this https://www.scalyr.com/blog/getting-started-angular-logging/ https://www.scalyr.com/blog/getting-started-angular-logging/
- znq 7y agoWe're working on a Web SDK for Bugfender, but unfortunately it'll still take a couple of months to finish and test properly, before we can release it. On our platforms page we have a subscription to get notified once a new platform is supported: https://bugfender.com/platforms/ https://bugfender.com/platforms/