-
Notifications
You must be signed in to change notification settings - Fork 125
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Proposal: add LogFormat static property
A large amount of time spent when maintaining the RxPlayer is actually spent on debugging device-specific issues. Consequently, we beefed-up our debugging capabilities: we added a LOT of logs, developed [our own specialized remote debugger](https://github.com/canalplus/RxPaired/) so we can be monitoring low-end devices for a long amount of time (unlike chrome's or webkit's debugger), developed some reverse-engineering tools as well as (closed-source) visual logging tools. Now that we have many tools at our disposition, I see that our regular logs (that can e.g. be produced by calling `RxPlayer.LogLevel = "DEBUG"`) - the most relied on way by application developpers - are lacking. The most evident lacking data is some kind of timestamp, to better understand time-related issues, which are frequent. But more than that, there's a lot of comfort in being able to rely on our aforementioned RxPaired remote debugger, so I was wondering if we could allow the production of logs in a format that could be easily imported by it. Hence the idea of a supplementary `RxPlayer.LogFormat` property. It is by default set to `"standard"` - which is the currently-existing format, but can also be set to the RxPaired-compatible `"full"` format which: - Immediately produces the `[Init]` log, which today only serves to provide a way to convert between date representations (date on the device or monotonic timestamp since the page was opened) inside RxPaired (and also ultimately perform protocol version detection). - Prepend each log with a timestamp and the "namespace" of the log (e.g. `[error]` for error logs). Here, we could tell application developpers not only to call: ```js RxPlayer.LogLevel = "DEBUG"; ``` But also: ```js RxPlayer.LogLevel = "full"; ``` When the idea is about communicating logs to us (if they just want to display logs for initial debugging steps of an issue potentially on their side or the content's side, the `"standard"` format may be clearer to them as less verbose).
- Loading branch information
1 parent
a9c6b54
commit b980ea0
Showing
9 changed files
with
327 additions
and
45 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.