vpx-js
vpx-js copied to clipboard
Improve logging
In my PR @freezy add a comment:
I usually try to prefix logs with where it occurs: [Myclass.myMethod]: My message
Make sense - why not improve the whole logger, some ideas:
- create a instance with its class name as prefix
- use debug - dynamic enable debug logging for certain classes might help
- future improvements, when public - send error logs to log aggregator to get realtime feedback
Potentail cloud log aggregator:
- https://aws.amazon.com/elasticsearch-service/ - guess its too complex for our use case
- https://www.loggly.com/plans-and-pricing/ lite is free up to 200mb per day, used that service in the past
- https://www.fluentd.org/ - could not find a service provider for this
Next pragmatic step:
- use debug - enables dynamic change of log level or depending on package (browser & node)
- will too a PoC