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
I'm trying to follow this guide to mask certain patterns before they show up in logs. However, it seems LogcatAppender does not support changing the <encoder> to LayoutWrappingEncoder.
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,909 |-INFO in ch.qos.logback.classic.LoggerContext[default] - Found resource [assets/logback.xml] at [assets/logback.xml]
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,909 |-INFO in ch.qos.logback.core.joran.spi.ConfigurationWatchList@3893637 - URL [jar:file:/data/app/com.example.myapp-nj2LI1lYKwhTc2KSqGp_1g==/base.apk!/assets/logback.xml] is not of type file
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,917 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - debug attribute not set
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,917 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - About to instantiate appender of type [ch.qos.logback.classic.android.LogcatAppender]
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,920 |-INFO in ch.qos.logback.core.joran.action.AppenderAction - Naming appender as [logcat]
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,922 |-INFO in ch.qos.logback.core.joran.action.NestedComplexPropertyIA - Assuming default type [ch.qos.logback.classic.encoder.PatternLayoutEncoder] for [tagEncoder] property
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,935 |-ERROR in ch.qos.logback.core.joran.util.PropertySetter@57b07a4 - A "ch.qos.logback.core.encoder.LayoutWrappingEncoder" object is not assignable to a "ch.qos.logback.classic.encoder.PatternLayoutEncoder" variable.
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,935 |-ERROR in ch.qos.logback.core.joran.util.PropertySetter@57b07a4 - The class "ch.qos.logback.classic.encoder.PatternLayoutEncoder" was loaded by
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,935 |-ERROR in ch.qos.logback.core.joran.util.PropertySetter@57b07a4 - [dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.myapp-nj2LI1lYKwhTc2KSqGp_1g==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.myapp-nj2LI1lYKwhTc2KSqGp_1g==/lib/x86, /system/lib, /system/product/lib]]]] whereas object of type
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,935 |-ERROR in ch.qos.logback.core.joran.util.PropertySetter@57b07a4 - "ch.qos.logback.core.encoder.LayoutWrappingEncoder" was loaded by [dalvik.system.PathClassLoader[DexPathList[[zip file "/data/app/com.example.myapp-nj2LI1lYKwhTc2KSqGp_1g==/base.apk"],nativeLibraryDirectories=[/data/app/com.example.myapp-nj2LI1lYKwhTc2KSqGp_1g==/lib/x86, /system/lib, /system/product/lib]]]].
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,935 |-ERROR in ch.qos.logback.classic.android.LogcatAppender[logcat] - No layout setfor the appender named [logcat].
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,935 |-INFO in ch.qos.logback.classic.joran.action.RootLoggerAction - Setting level of ROOT logger to DEBUG
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,935 |-INFO in ch.qos.logback.core.joran.action.AppenderRefAction - Attaching appender named [logcat] to Logger[ROOT]
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,935 |-INFO in ch.qos.logback.classic.joran.action.ConfigurationAction - End of configuration.
2024-09-23 14:53:03.937 18764-18764 System.out com.example.myapp I 14:53:03,935 |-INFO in ch.qos.logback.classic.joran.JoranConfigurator@e8e690d - Registering current configuration as safe fallback point
logback-android version
3.0.0
OS Version
14
What logback configuration are you using? (logback.xml or Java/Kotlin code)
Describe the bug
I'm trying to follow this guide to mask certain patterns before they show up in logs. However, it seems
LogcatAppender
does not support changing the<encoder>
toLayoutWrappingEncoder
.Reproduction
https://www.baeldung.com/logback-mask-sensitive-data
Logs
Click to expand!
logback-android version
3.0.0
OS Version
14
What logback configuration are you using? (logback.xml or Java/Kotlin code)
Validations
The text was updated successfully, but these errors were encountered: