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

No log is printed with Slf4j 2.x.x #249

Closed
toantk238 opened this issue Nov 3, 2022 · 10 comments · Fixed by #247 or #297
Closed

No log is printed with Slf4j 2.x.x #249

toantk238 opened this issue Nov 3, 2022 · 10 comments · Fixed by #247 or #297
Labels
Milestone

Comments

@toantk238
Copy link

Description

I apply the slf4j version 2.0.3 in android project.
I tried to print log with debug, error level but nothing is printed. I check via logcat.

If I rollback to version 1.7.36, it works.

Steps to reproduce

implementation("org.slf4j:slf4j-api:2.0.3")
implementation("com.github.tony19:logback-android:2.0.0")

Environment

Android version : 9
Device : Huawei Nova 3i

@toantk238 toantk238 added the bug label Nov 3, 2022
@toantk238 toantk238 changed the title No log is print with Slf4j 2.x.x No log is printed with Slf4j 2.x.x Nov 3, 2022
@MNCloudwerksTechnology
Copy link

MNCloudwerksTechnology commented Nov 3, 2022

We have the same problem in our app, just after upgrading to Android target sdk 33 and setting both source- and targetCompatibility to JDK 11. After a bit of deep diving we noticed the following:

  • Xml file was not read and logger fell back into NOPLogger implementation
  • This was also the case when creating a logger via programmatic approach
  • Already the call LoggerFactory.getILoggerFactory() produced a NOPLoggerFactory
  • Same things happen on older versions of both slf4j-api and logback-android

Same thing happens when trying to use the original logback dependencies without the logback-android one like this:

implementation 'ch.qos.logback:logback-classic:1.2.3' implementation 'ch.qos.logback:logback-core:1.2.6' implementation 'ch.qos.logback:logback-parent:1.2.6'

This makes me believe that there is a general incompatibility wiith either Android 13 or Java 11 in the core libraries. I will research further and if necessary create a ticket for ch.qos.logback. If so, i will link it here.

@tony19

This comment was marked as outdated.

@tony19 tony19 added this to the 3.0.0 milestone Nov 6, 2022
@JAYP1255

This comment was marked as outdated.

@JAYP1255

This comment was marked as outdated.

@tony19 tony19 reopened this Dec 4, 2022
@schildbach

This comment was marked as outdated.

@tony19

This comment was marked as outdated.

@conbrad
Copy link

conbrad commented Mar 26, 2023

We're also affected by this issue. I noticed the major release linked above has no specific date, would you be open to cutting that release sooner than later?

@tony19
Copy link
Owner

tony19 commented Mar 27, 2023

Fix is released in v3.0.0. It may take a while before it's indexed in Maven Central.

@conbrad
Copy link

conbrad commented Mar 27, 2023

Fix is released in v3.0.0. It may take a while before it's indexed in Maven Central.

Thank you!

@sorinirimies
Copy link

Thank you so much.

@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
7 participants