Skip to content

Fix double-formatting client-side#25

Merged
peaBerberian merged 1 commit into
mainfrom
fix/double-formatting2
Mar 17, 2025
Merged

Fix double-formatting client-side#25
peaBerberian merged 1 commit into
mainfrom
fix/double-formatting2

Conversation

@peaBerberian
Copy link
Copy Markdown
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