-
Notifications
You must be signed in to change notification settings - Fork 33
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
FlutterLogs.exportLogs doesn't return (await hangs) if there are 0 files #39
Comments
I'm trying to debug this. The problem is that when there are no files, then the flutter_logs/example/lib/main.dart Line 51 in 3ac8a1a
In |
There's nothing in Logcat besides |
Maybe the flutter_logs/android/src/main/kotlin/com/flutter/logs/plogs/flutter_logs/FlutterLogsPlugin.kt Line 233 in 3ac8a1a
exportPLogs: PLog Error: log entries either in LogCat.
|
Ugly because now besides file writing there's also a preferences bool set every time something is logged.
Ugly because now besides file writing there's also a preferences bool set every time something is logged.
Running version 2.1.11 on Android, it seems exportLogs never returns no matter what. I have log files, I can see the ZIP file created fine, but onComplete or then never runs:
Haven't tried on iOS yet. |
My code is
FlutterLogs.exportLogs(exportType: ExportType.ALL);
as a preparation for exporting all logs. My app has a button the user can tap to export logs. However if there wasn't any logging going on so far (0 files) then the function call doesn't return. I see this in the debug log output:I/ExportTypes(17208): getLogsForAllInRoot: Path: /storage/emulated/0/Android/data/dev.csaba.track_my_indoor_exercise/files/Logs/Logs/, Files: 0
I either need it to return with some special code or need a function call which tells me if there's anything to export so I can enable / disable the button. Currently the QA testers report this as a bug to me because they are clicking on the button and "nothing is happening". I'd like to display a dialog if there's nothing to export.
The text was updated successfully, but these errors were encountered: