Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix double-formatting client-side #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

peaBerberian
Copy link
Collaborator

This is an alternative attempt (after
#22) at fixing the "double formatting" situation brought by
canalplus/rx-player#1469 that may be made much more frequent by canalplus/rx-player#1625.

This solution fixes it client-side instead, which could be seen as arguably less ugly.

The idea is to rely on the fact that the RxPlayer does full formatting by calling log functions with at least three arguments:

  1. The timestamp in a string format with always numbers after a comma
  2. A "namespace" (e.g. "[warn]") 3-n. The log message's arguments

By considering this, we can very easily detect client-side a probable case of full formatting.

This is an alternative attempt (after
#22) at fixing the
"double formatting" situation brought by
canalplus/rx-player#1469 that may be made much
more frequent by canalplus/rx-player#1625.

This solution fixes it client-side instead, which could be seen as
arguably less ugly.

The idea is to rely on the fact that the RxPlayer does full formatting
by calling log functions with at least three arguments:
  1. The timestamp in a string format with always numbers after a comma
  2. A "namespace" (e.g. "[warn]")
  3-n. The log message's arguments

By considering this, we can very easily detect client-side a probable
case of full formatting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant