-
Notifications
You must be signed in to change notification settings - Fork 50
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
ios: enhance tapable logger to handle variadic args from the JS log #524
Conversation
/canary |
/canary |
player.logger.hooks.warn.tap(name: pluginName, { print($0) }) | ||
player.logger.hooks.error.tap(name: pluginName, { print($0 ?? "", $1?.localizedDescription ?? "") }) | ||
|
||
let prefixedMessage = player.logger.hooks.prefixMessage.call(logLevel) ?? "" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i think we can remove the prefixMessage
hook from TapableLogger
, and just have that be opinionated behavior of PrintLoggerPlugin
/canary |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #524 +/- ##
==========================================
+ Coverage 91.91% 91.92% +0.01%
==========================================
Files 341 341
Lines 27311 27290 -21
Branches 1944 1944
==========================================
- Hits 25103 25087 -16
+ Misses 2194 2189 -5
Partials 14 14 ☔ View full report in Codecov by Sentry. |
#523
Change Type (required)
Indicate the type of change your pull request is:
patch
minor
major
Does your PR have any documentation updates?
Release Notes
Prefixing message with the format
[Player] [\(logLevel)]:
moved out of the Tapable logger and moved to PrintLoggerPlugin. Any consumers using their own LoggerPlugin will need to append the logLevel if they want to print itBefore
After
Breaking Changes
Any usage of the
player.logger.hooks
taps will have breaking changes in the callback because the calls have been changed to provide a[Any]
type instead ofString
so it can be returned in the form of messages instead of a single message. Unless nothing is done in the callback to access the value but just to print it, there should be breaking changesExample:
📦 Published PR as canary version:
0.9.2--canary.524.17782
Try this version out locally by upgrading relevant packages to 0.9.2--canary.524.17782
Version
Published prerelease version:
0.10.0-next.0
Changelog
Release Notes
ios: enhance tapable logger to handle variadic args from the JS log (#524)
Prefixing message with the format
[Player] [\(logLevel)]:
moved out of the Tapable logger and moved to PrintLoggerPlugin. Any consumers using their own LoggerPlugin will need to append the logLevel if they want to print itBefore
After
Breaking Changes
Any usage of the
player.logger.hooks
taps will have breaking changes in the callback because the calls have been changed to provide a[Any]
type instead ofString
so it can be returned in the form of messages instead of a single message. Unless nothing is done in the callback to access the value but just to print it, there should be breaking changesExample:
🚀 Enhancement
🐛 Bug Fix
🏠 Internal
Authors: 4