JakeWharton / JakeWharton/timber

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

Open
#380 3 comments 10 reactions 0 assignees View on GitHub
Dominant language
Kotlin
Stars
10.8k
Forks
994
Avg merge
17h 16m
Merged PRs (30d)
17

Description

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

e.g.
```kotlin
Log.e("MyActivity", "Logging an error")
```

![image](https://user-images.githubusercontent.com/463186/74478882-19373a00-4e63-11ea-91f5-436af866e660.png)

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

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

**Update**: This is only an issue in Kotlin.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by reproducing the Kotlin lint check shown in the issue and inspect the lint suggested-fix path for Log calls using the `Log` and `Timber` examples. Done means applying either suggested fix produces a valid Timber call such as `Timber.e("Logging an error")`, rather than `Log.Timber.e(...)`.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, kotlin
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.