-
Notifications
You must be signed in to change notification settings - Fork 843
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
option to disable logging #151
Comments
I think we should remove all logs from both android and ios, there used to be an issue about that. We'd be glad if you could contribute with a PR, @shawn736 . |
I think the It should be a relatively easy improvement if someone is interested in helping out :) |
@luanpotter did this got fixed when the refactor to swift was made? |
Not yet, I made a refactor to allow it but didn't wire yet. |
# Description - Replace Platform Method Channels (from platform -> to lib) with Event Channels - Combined Event stream for player (`PlayerEvent`) and global (`GlobalEvent`) events - Add methods `create`, `dispose` and `getEventStream` to `AudioplayersPlatformInterface` - Add method `getGlobalEventStream` to `GlobalAudioplayersPlatformInterface` - Add log stream `player.onLog()` and `AudioPlayer.global.onLog()` - Example for using Logger - Throw PlatformException on Method Error via Method Channel (lib -> platform) - Emit PlatformException on Event Error via Event Channel (platform -> lib) `player.eventStream.listen().onError()` and `AudioPlayer.global.eventStream.listen().onError()` - Add docs ## Breaking Change ### Migration instructions **audioplayers**: | Before | After | |---|---| | deprecated `AudioPlayer.global.changeLogLevel(LogLevel.info)` | `Logger.logLevel = LogLevel.info` | | deprecated `AudioPlayer.global.logLevel` | `Logger.logLevel` | | deprecated `AudioPlayer.global.log()` | `Logger.log()` or `Logger.error()` | | deprecated `AudioPlayer.global.info()` | `Logger.log()` | | deprecated `AudioPlayer.global.error()` | `Logger.error()` | | `ForPlayer<>` | _removed_ | **audioplayers_platform_interface**: | Before | After | |---|---| | `LogLevel` | _moved_ to `audioplayers` package | | `StreamsInterface` | _removed_ | | `ForPlayer<>` | _removed_ | ## Related Issues Closes #106 Closes #151 Closes #1266 Can handle error of #1260 Related to #208 and #933, but cannot hide Android MediaPlayer logs This would bypass: flutter/flutter#69103
Please don't use NSLog in iOS to print information, or a switch is needed. For example :
NSLog(@"iOS => call %@, playerId %@", call.method, playerId);
The text was updated successfully, but these errors were encountered: