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

Lint fix for "Using 'Log' instead of 'Timber...' is incorrectly applied #380

Open
arriolac opened this issue Feb 13, 2020 · 3 comments · Fixed by launchdarkly/android-client-sdk#141

Comments

@arriolac
Copy link

arriolac commented Feb 13, 2020

The lint checks that are applied whenever you use Log instead of Timber suggests that you should use Timber instead.

e.g.

Log.e("MyActivity", "Logging an error")

image

However, when you apply the suggested fix (1st or 2nd option in the screenshot), you get:

Log.Timber.e("Logging an error")

Update: This is only an issue in Kotlin.

@TobiasReich
Copy link

I'm still having the same issue. Any ETA for that?

@jknair0
Copy link

jknair0 commented Aug 18, 2020

String logCallSource = logCall.asSourceString();

In this statement, for the java source quick fix JavaUCallExpression.asSourceString returns android.util.Log.<methodName>(<args>) as String where as for the kotlin source quick fix KotlinUFunctionCallExpression.asSourceString returns only <methodName>(<args>) as String. Thus the issue.

@vostrnad
Copy link

Hi, I see the linked pull request is still open, but there don't seem to be any issues with it. Can we have it merged?

hannesa2 pushed a commit to hannesa2/timber that referenced this issue Apr 13, 2021
hannesa2 pushed a commit to hannesa2/timber that referenced this issue Apr 13, 2021
hannesa2 added a commit to hannesa2/timber that referenced this issue Apr 13, 2021
fix JakeWharton#380 Quick-Fix incorrectly applied in kotlin
hannesa2 pushed a commit to hannesa2/timber that referenced this issue Aug 11, 2021
hannesa2 pushed a commit to hannesa2/timber that referenced this issue Aug 11, 2021
hannesa2 pushed a commit to hannesa2/timber that referenced this issue Oct 21, 2021
hannesa2 pushed a commit to hannesa2/timber that referenced this issue Oct 21, 2021
hannesa2 pushed a commit to hannesa2/timber that referenced this issue Nov 28, 2021
hannesa2 pushed a commit to hannesa2/timber that referenced this issue Nov 28, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants