Simple Logging Façade for Java aka SLF4J has been around us for quite a while and it has proved itself a valuable tool while developing Java applications as well as Android apps. It is not a logging platform itself but simply a façade to provide support to other logging platforms like Bugfender. It is not necessary but you can use SLF4J API using migrate tools to import the Java source files to SLF4J.
SLF4J Android is simply a combination of two features.
- A repackaged and improved SLF4J API
- A gateway to forward all SLF4J logs to any logger, like for example Bugfender, provided by the developer in Android platform.
The repackaged API is based on the original source code. Depending on what development tool you are using, the usage of SLF4J may vary. You can see the detailed implementation here. The implementation does not support Markers in logging methods and Marker parameters are ignored.
SLF4J is not a complete logging solution and it does not provide configuration of logging levels. SLF4J’s main responsibility is to decouple your application from the logging APIs. SLF4J version 1.7.0 requires JDK 1.5 while the previous versions of SLF4J work with JDK 1.4. All newer versions of SLF4J are compatible with previous versions. That means you can upgrade from older to newer versions without experiencing any issue.
What Are 1000 Apps Doing to Reduce Their Bugs to Zero?
Down to Zero is a practical guide to solving bugs. Our team has been developing mobile apps for over a decade and we'd like to share some tips we've picked up along the way.
Using Bugfender with SLF4J
As mentioned earlier, SLF4J is a logging façade and you can use Bugfender for remote logging. Bugfender is a revolutionary remote logging tool available for Android and iOS development. The main idea behind using Bugfender is to discover bugs before users do and fix those issues immediately. Although there are many crash reporting tools available for mobile development but as the name suggests, crash reporting tools are specifically designed to report just crash.
However, not all of the bugs result in total failure as some bugs lead to unexpected and abnormal behavior. This kind of behavior from mobile apps not only puts negative impact on the overall user experience but also cause stability issues, performance issues and in some cases security issues. This is just half of the story; it is almost impossible to reproduce a bug in controlled environment like lab. And not all of the users have enough technical knowledge of the mobile apps and development process so they can describe that particular bug to the developer.
This kind of situations ultimately lead to negative reviews from the users and lost customer base just because of a bug the developer cannot fix in time. SLF4J combined with Bugfender allows developers to get their hands on detailed logs regarding the performance and activities of their apps on Android devices. Although Bugfender is available for iOS development too but the remote logging has proved itself more important on Android devices because of the Android fragmentation.