Replace default Android log calls with Logger to instantly get formatted, bordered debug output in Android Studio.
Pretty-print JSON API responses or XML payloads in Logcat instead of seeing them as a single unreadable long line.
Disable all debug logs in production with a single flag so sensitive debug information never reaches end users.
Save debug logs to a CSV file on the device for later analysis or crash reporting.
Logger is a small Java library for Android that makes log output in Android Studio easier to read. When you are building an Android app, developers frequently print messages to a debug console to understand what the app is doing. Android has a built-in logging system called Logcat, but its output can be hard to scan at a glance. Logger formats those same messages with borders, thread information, and method traces so they stand out visually. Adding it to a project takes two steps: one line in the build file to include the library as a dependency, and one line of Java code to initialize it. After that you call Logger's methods the same way you would call the standard Android log functions, passing a message string. It supports all the standard log levels: debug, error, warning, verbose, information, and a special level the library calls "What a Terrible Failure" for catastrophic errors. Beyond plain text messages, Logger can also pretty-print JSON and XML content, which formats structured data in an indented, readable way rather than printing it as a single long line. Collections like lists, maps, sets, and arrays are also handled, printing their contents in a structured format instead of showing only the object reference. The library lets you customize how logs are formatted: you can hide the thread info, control how many levels of the call stack are shown, redirect output to a custom destination, or set a global tag for all messages. A loggable check function makes it easy to disable all log output in production builds with a single flag, so debug messages do not appear for end users. Logs can also be saved to disk by swapping to a different adapter that writes to a CSV file. There is also an integration option for Timber, another popular Android logging wrapper.
← orhanobut on gitmyhub — every repo by this author, as a profile.
Verify against the repo before relying on details.