-
-
Notifications
You must be signed in to change notification settings - Fork 535
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: turn off camerax info logs #1325
fix: turn off camerax info logs #1325
Conversation
// This prevents the informational log spam from CameraX. | ||
private fun configureCameraProcessProvider() { | ||
try { | ||
val config = CameraXConfig.Builder.fromConfig(Camera2Config.defaultConfig()).apply { |
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.
This uses the default Camera2 config and extends it with the override for logging level.
Per the docs in https://developer.android.com/reference/androidx/camera/lifecycle/ProcessCameraProvider#configureInstance(androidx.camera.core.CameraXConfig)
we can only do this once, though, since it is a singleton.
@@ -42,7 +45,6 @@ import dev.steenbakker.mobile_scanner.utils.serialize | |||
import io.flutter.view.TextureRegistry | |||
import kotlinx.coroutines.CoroutineScope | |||
import kotlinx.coroutines.Dispatchers | |||
import kotlinx.coroutines.coroutineScope |
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.
Unused import
@@ -55,5 +55,8 @@ jobs: | |||
- uses: subosito/flutter-action@v2 | |||
with: | |||
cache: true | |||
# TODO: move the code to the new tall style once Flutter 3.29 is the new minimum. |
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.
The formatting action is using the latest stable Flutter version, 3.29.0.
That opts us into Dart 3.7 which includes new tall-style formatting.
This PR turns off the CameraX logging for the
Log.DEBUG
,Log.INFO
andLog.WARN
logging.Per the docs of CameraX:
We could technically also allow
Log.WARN
, but I'm not sure if that is going to help much.Fixes #1255