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
As stated in the readme, one option for unit tests is to use logback-classic as a replacement for logback-android.
Since the upgrade to sl4j 2.0 (#247) the ILoggingEvent class is no longer binary compatible with logback-classic.
Specifically, and where this matters, is with regards to markers.
logback-android has:
List getMarkers
logback-classic has:
Marker getMarker
List getMarkerList
Reproduction
Call getMarkers() on a ILoggingEvent in a custom encoder (extending EncoderBase<ILoggingEvent>), use this custom encoder from a test where logback-android has been replaced with logback-classic
Example:
class CustomEncoder : EncoderBase<ILoggingEvent>() {
override fun headerBytes(): ByteArray? = null
override fun footerBytes(): ByteArray? = null
override fun encode(event: ILoggingEvent): ByteArray {
return "markers: ${event.markers}".toByteArray()
}
}
Logs
No response
logback-android version
3.0.0
OS Version
14
What logback configuration are you using? (logback.xml or Java/Kotlin code)
No response
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.
Describe the bug
As stated in the readme, one option for unit tests is to use logback-classic as a replacement for logback-android.
Since the upgrade to sl4j 2.0 (#247) the ILoggingEvent class is no longer binary compatible with logback-classic.
Specifically, and where this matters, is with regards to markers.
logback-android has:
List getMarkers
logback-classic has:
Marker getMarker
List getMarkerList
Reproduction
Call getMarkers() on a ILoggingEvent in a custom encoder (extending
EncoderBase<ILoggingEvent>
), use this custom encoder from a test where logback-android has been replaced with logback-classicExample:
Logs
No response
logback-android version
3.0.0
OS Version
14
What logback configuration are you using? (logback.xml or Java/Kotlin code)
No response
Validations
The text was updated successfully, but these errors were encountered: