Skip to content
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

DiskLogAdapter do not work #256

Open
junerver opened this issue Aug 26, 2021 · 1 comment
Open

DiskLogAdapter do not work #256

junerver opened this issue Aug 26, 2021 · 1 comment

Comments

@junerver
Copy link

Please try to fill all questions below before submitting an issue.

  • Android studio version: Arctic Fox 2020.3.1
  • Android gradle plugin version: 7.0.0
  • Logger version: 2.2.0
  • Emulator/phone information: mi 10 u
  • If possible, please add how did you initialize Logger?
    in Application onCreate
  • Is it flaky or does it happen all the time?
    all the time

i init logger like this :

class App : Application() {
    override fun onCreate() {
        super.onCreate()
        val formatStrategy: FormatStrategy = PrettyFormatStrategy.newBuilder()
            .methodCount(3) // (Optional) How many method line to show. Default 2
            .tag("custom")
            .build()
        Logger.addLogAdapter(object:AndroidLogAdapter(formatStrategy){
            override fun isLoggable(priority: Int, tag: String?): Boolean {
                return BuildConfig.DEBUG
            }
        })
        val csvformatstrategy: FormatStrategy = CsvFormatStrategy.newBuilder()
            .tag("custom")
            .build()

        Logger.addLogAdapter(DiskLogAdapter(csvformatstrategy))
    }
}

and I have authorized read and write permissions,but it do not work,
There is no logger folder in the external storage file directory

@lupaulus
Copy link

Check my fork I added support for Disklog with SDK 30 -> Repo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants