Giter Club home page Giter Club logo

Comments (1)

JakeWharton avatar JakeWharton commented on June 1, 2024 1

The stack trace is appended to the message before calling log as you can see here:

if (message == null) {
if (t == null) {
return; // Swallow message if it's null and there's no throwable.
}
message = Log.getStackTraceString(t);
} else {
if (args.length > 0) {
message = String.format(message, args);
}
if (t != null) {
message += "\n" + Log.getStackTraceString(t);
}
}
.

I just tried:

Throwable e = new IOException("Broke!");
Timber.e(e, "An exception happened");

with 3.1.0 and saw in the logs:

                CashApp  E  An exception happened
                         E  java.io.IOException: Broke!
                         E      at com.squareup.cash.CashApp.onCreate(CashApp.java:45)
                         E      at android.app.Instrumentation.callApplicationOnCreate(Instrumentation.java:1012)
                         E      at android.app.ActivityThread.handleBindApplication(ActivityThread.java:4553)
                         E      at android.app.ActivityThread.access$1500(ActivityThread.java:151)
                         E      at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1364)
                         E      at android.os.Handler.dispatchMessage(Handler.java:102)
                         E      at android.os.Looper.loop(Looper.java:135)
                         E      at android.app.ActivityThread.main(ActivityThread.java:5254)
                         E      at java.lang.reflect.Method.invoke(Native Method)
                         E      at java.lang.reflect.Method.invoke(Method.java:372)
                         E      at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:903)
                         E      at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:698)

from timber.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.