umair13adil / flutter_logs

An extensive logging framework developed for flutter apps.
https://itnext.io/sending-logs-from-flutter-apps-in-real-time-using-elk-stack-mqtt-c24fa0cb9802
Apache License 2.0
40 stars 32 forks source link

Is it possible to define to the full path of where the logs are supposed to be? #40

Open auxilim opened 2 years ago

auxilim commented 2 years ago

Hey,

First of all, great work, I found flutter_logs is the best way to log thing in a flutter app.

My problem is that I store my app files in a complete different folder, and I would like to group every files in one location. I tried to set this option:

logsWriteDirectoryName: await (FileManagement.getLocalPath()),

But it just add the path to this "base" path, and I end up with this log location:

/storage/emulated/0/Android/data/project.package/files/data/user/0/project.package/app_flutter

Or a work around for me would be to have a way to know the actual path of where the logs are?

Thank you for help!

umair13adil commented 2 years ago

Hi,

Thank you for liking this plugin.

The plugin is actually forcing all log files to be only written to the internal storage directory, The logs will always be stored in your app's root folder & within the sub directory path that you have provided.

savePath = File(context.getExternalFilesDir(null), savePath).path