Improve logging
Created by: wilaw
The current dash.js framework produces a flood of log information. It can be turned off entirely or consumed in totality - there is no intermediate level. To make logging more useful in resolving issues, the following feature changes are requested:
Action: Modify logging system to be level based. It will use the following levels:
- debug: what we have today. Everything.
- info: key events (ex: segment loaded, bitrate changes).
- warning: (ex: timecode jumping, fetch is not available, EME not available, adaptations set that are not supported, semantic problems with the mpd that dont avoid playback to start).
- error: errors that don't stop playback (ex: segment 404, codec errors - fallback).
- fatal: Playback fails completely (codecs not supported).
Action: Modify log method so it has a level parameter and add a new method to MediaPlayer API so user can select from which level, logs will be written in the console. Example: if user sets log level to be debug then all log messages will be writen to the console; if user sets log level to be warning then warning, error and fatal messages will be writen.
Action: Enable classname in logs by default.
Action: Deprecate log EVENT. Two dash.js versions after the deprecation it will be finally removed.
Cheers Will