-
-
Notifications
You must be signed in to change notification settings - Fork 174
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
SQLiteAppender and ProGuard #179
Comments
TLDR: Bug found in I can confirm an exception in the release/obfuscated build:
This occurs because the release apk's |
Release builds that contain no debug info for stack traces result in nulls for caller data, causing SQLiteAppender to attempt INSERT statements with illegal null values. This patch null-checks those INSERT-bindings to avoid the exception and allow existing debug-enabled apps to log caller data to the database.
Fixed in |
This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Issue description
In release builds obfuscated with ProGuard, logging to an SQLiteAppender results in the SQLite database file being created, but no entries are added to it. When ProGuard is disabled logging works as expected.
Logback configuration
The logback configuration is carried out at runtime, without using the logback.xml file. An
SQLiteAppender
and aLogcatAppender
are started and added to the created loggers. The Logcat appender works in both obfuscated and unobfuscated builds, while the SQLite one does not append any entry to the database when using obfuscated builds.ProGuard rules
The relevant rules in our ProGuard file are:
We have also tried adding the public modifier after the
-keep
directive, but to no avail.Is there any additional SQLite-related rule that we should add?
Environment
Library version:
com.github.tony19:logback-android:1.1.1-11
+org.slf4j:slf4j-api:1.7.25
Android version: tested on Android 6.0.1 (LG Nexus 5) and 8.1.0 (Google Pixel 2)
The text was updated successfully, but these errors were encountered: