Skip to content

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.
@peaBerberian peaBerberian force-pushed the fix/double-formatting2 branch from e14b694 to 532d12b Compare March 17, 2025 12:14
@peaBerberian peaBerberian merged commit 3389642 into main Mar 17, 2025
2 checks passed
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.

2 participants