You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
LoggerConfigurator.init(
Logger.Level.WARN, /* Minimum level to log */
123, /* Application ID */
"AndroidLogApp", /* Application name */
BuildConfig.VERSION_NAME, /* Application version */
"123456789", /* Device ID */
"AndroidLogApp.log"
) /* File name prefix */
LoggerConfigurator.addAppender(LogcatAppender(LogcatLayout()))
LoggerConfigurator.addAppender(FileAppender(applicationContext, CsvLayout()))
}
And here is the logcat
E/AndroidLogApp: java.io.FileNotFoundException: /storage/emulated/0/logs/AndroidLogApp/AndroidLogApp.log20200309: open failed: ENOENT (No such file or directory)
at libcore.io.IoBridge.open(IoBridge.java:496)
at java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at java.io.FileWriter.<init>(FileWriter.java:107)
at com.ech0s7r.android.log.service.WriterService.f(SourceFile:150)
at com.ech0s7r.android.log.service.WriterService.a(SourceFile:45)
at com.ech0s7r.android.log.service.WriterService$b.run(SourceFile:67)
Caused by: android.system.ErrnoException: open failed: ENOENT (No such file or directory)
at libcore.io.Linux.open(Native Method)
at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
at libcore.io.BlockGuardOs.open(BlockGuardOs.java:252)
at libcore.io.ForwardingOs.open(ForwardingOs.java:167)
at android.app.ActivityThread$AndroidOs.open(ActivityThread.java:7419)
at libcore.io.IoBridge.open(IoBridge.java:482)
at java.io.FileOutputStream.<init>(FileOutputStream.java:235)
at java.io.FileWriter.<init>(FileWriter.java:107)
at com.ech0s7r.android.log.service.WriterService.f(SourceFile:150)
at com.ech0s7r.android.log.service.WriterService.a(SourceFile:45)
at com.ech0s7r.android.log.service.WriterService$b.run(SourceFile:67)
The text was updated successfully, but these errors were encountered:
getExternalStorageDirectory()
This method was deprecated in API level 29. To improve user privacy, direct access to shared/external storage devices is deprecated. When an app targets Build.VERSION_CODES.Q, the path returned from this method is no longer directly accessible to apps. Apps can continue to access content stored on shared/external storage by migrating to alternatives such as Context#getExternalFilesDir(String), MediaStore, or Intent#ACTION_OPEN_DOCUMENT.
class LoggerConfigurator line 31
APP_DIR_PATH = Environment.getExternalStorageDirectory().getAbsolutePath() + "/logs/" + APP_NAME;
Having exception with the export to csv file
Kotlin 1.3.70
Lintoptions enabled
Init Log Function
And here is the logcat
The text was updated successfully, but these errors were encountered: