noveogroup / android-logger

Useful logger for Android based on standard android.util.Log class. Simple lightweight (< 50 Kb) implementation of SLF4J API. Easy but powerful configuration via properties file and some additional helpful logging methods. Easy analogue of popular log4j library.

Home Page:https://noveogroup.github.io/android-logger

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parametrize logging statement in presence of a Throwable

oakkitten opened this issue · comments

To be more clear for this issue. When using the SLF4J adapter and using parameterized methods, it doesn't detect the Exception part and instead passes a null Exception to the underlying implementation.

Given this log, it only prints the message and does not include the stack trace.

String myParam = "testing";
Exception exception = new Exception();
log.info("Something happened. {}", myParam, exception);