Skip to content

Can't Create Logger: DateTokenConverter not found? #344

Description

@davidvedvick

Describe the bug

After upgrading the Android Gradle Plugin to 8.0, my application crashes. Logs indicate that this is because I have an invalid date token, but the date token appears correct.

java.lang.RuntimeException: Unable to create application com.lasthopesoftware.bluewater.MainApplication: java.lang.IllegalStateException: FileNamePattern [/storage/emulated/0/Android/data/com.lasthopesoftware.bluewater/files/logs/%d{yyyy-MM-dd}.log] does not contain a valid DateToken

Issue starts occurring in this commit:

namehillsoftware/projectBlue@76e9c64

and is worked around by this commit:

namehillsoftware/projectBlue@6d4def3

Updating the proguard file to avoid DateTokenConverter (and other converters perhaps) seemed to fix it:

-keepclassmembers class ch.qos.logback.core.rolling.helper.* { <init>(); }

Reproduction

namehillsoftware/projectBlue@76e9c64

Logs

No response

logback-android version

3.0.0, 2.0.0

OS Version

Android 13

What logback configuration are you using? (logback.xml or Java/Kotlin code)

Kotlin code

Validations

  • Check that there isn't already an issue that reports the same bug to avoid creating a duplicate.
  • Check that this is a concrete bug. For Q&A, please open a GitHub Discussion instead.
  • The provided reproduction is a minimal reproducible of the bug.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions