Questions tagged [timber-android]

Timber is an Android logging library created by Jake Wharton.

51 questions
34
votes
4 answers

Timber Not Logging in Kotlin Android

Timber is a great library for logging in Android. In Kotlin classes though, doesn't output anything. How can I fix this? MainActivity.kt code: Timber.e("Timber Log 1") Log.e("MainActivity", "Log 1") Gradle: I've tried the regular Java…
Ethan_AI
  • 1,049
  • 2
  • 13
  • 20
28
votes
5 answers

Timber log is not printing in debug console or Logcat

Log.i("Test", "Hello, Log") Timber.i("Hello, Timber") I can see the Log.i log in Debug console and Logcat, I don't see the Timber log in anywhere. I/Test: Hello, Log I'm building in stagingDebug mode. (I have 4 options, production debug and…
Expert wanna be
  • 10,218
  • 26
  • 105
  • 158
20
votes
6 answers

Log method name and line number in Timber

Is possible log the current line number and method name using the Timber library? Expected LogCat result: ismaeldivita.myapp I/[L:22] [M:onResume] [C:HomeActivity]: Praise the log!
Ismael Di Vita
  • 1,806
  • 1
  • 20
  • 35
15
votes
4 answers

Cannot resolve method 'plant(timber.log.Timber.DebugTree)'

What is wrong with my configuration or code ? I have this error highlighted Cannot resolve method 'plant(timber.log.Timber.DebugTree)' for the code import timber.log.Timber; public class AppClass extends Application { @Override public…
C.B.
  • 378
  • 6
  • 19
11
votes
4 answers

Can I use Timber Logger on my java library?

I add the Timber dependency to my Java Core Library Module build.gradle file: implementation 'com.jakewharton.timber:timber:4.6.0' Although it did not give an error when gradle synchronizes, I cannot see or use Timber class in the Core Library.
alexpfx
  • 6,412
  • 12
  • 52
  • 88
10
votes
3 answers

Tag is null when using Timber

When the DebugTree logs, I see the class name, however when I create a custom Tree, the tag is null. Here what my custom tree looks like: public class CrashlyticsTree extends Timber.Tree { private static final String CRASHLYTICS_KEY_PRIORITY =…
Sree
  • 2,727
  • 3
  • 29
  • 47
7
votes
1 answer

How redirect Timber logs to Junit logcat

I'm using Timber with a DebugTree and a ProductionTree. All is fine and perfect in the running app. I also succeed to use Timber in my JUnit test implementation, and that's fine (no real benefit, but it does work). However, I would like to get the…
Anthony
  • 3,989
  • 2
  • 30
  • 52
7
votes
1 answer

What exactly does the Timber library do?

I heard about Timber and was reading github README, but it's quietly confusing me. Behavior is added through Tree instances. You can install an instance by calling Timber.plant. Installation of Trees should be done as early as possible. The…
Mahdi Moqadasi
  • 2,029
  • 4
  • 26
  • 52
6
votes
1 answer

Unresolved Reference even after adding to gradle

I am getting resolved reference to these three classes: Timber Leak Canary findNavController I have added dependencies for these in my gradle i have these dependencies in other projects also but I am facing issue here. I have tried to: clean,…
6
votes
1 answer

How to tell Timber which log call is for which Tree?

I have Timber library for logging and cooperation with crash-reporting services and I have both Crashlytics and Loggly services in my app. Thus, I had to plant two trees: Timber.plant(new CrashlyticsTree()); Timber.plant(new…
Kaloyan Roussev
  • 14,515
  • 21
  • 98
  • 180
4
votes
1 answer

Android/Kotlin: unresolved reference: timber

I'm trying to write a kotlin library for Android and can't include timber. I always get the following error: Error:error: unresolved reference: timber I have this in my build.gradle: apply plugin: 'java-library' apply plugin: 'kotlin' dependencies…
mbonnin
  • 6,893
  • 3
  • 39
  • 55
4
votes
3 answers

timber lint: ClassNotFound: com/android/tools/lint/detector/api/Detector$JavaPsiScanner

The Timber (V 4.5.0) lint checks only work via Gradle (but not via the lint command and also not in Android Studio Version 2.3 Beta2). Summary When I run lint directly on the command line I get an error. lint --show TimberArgCount Could not load…
TmTron
  • 17,012
  • 10
  • 94
  • 142
3
votes
1 answer

Write all exception in file

I'm using Timber to write some logs to file which located on device. For now, I'm writing my selected logs and some response from server using HTTP interceptor. But I want to write in file all exception (fatal, for example). Is it possible with…
Strangelove
  • 761
  • 1
  • 7
  • 29
3
votes
2 answers

Timber duplicate logs after calling finish() and restarting app

I have an onTouchListener on my TextView. On touch, I log with Timber.i() and then I call finish(). If after finish(), I launch my app again, and click again on the TextView, It will log twice, then 3 times, etc... (If I replace Timber.i() by the…
user2686744
3
votes
3 answers

Gradle clean fails because of lint & timber

Using Android Studio 1.5.1 on Windows 7, and gradle 2.8 or 2.10, I got the following error when trying to run a gradle clean (only when using Timber): gradle clean Incremental java compilation is an incubating feature. …
Crachou
  • 53
  • 6
1
2 3 4