View on GitHub


A Log wrapper for Android applications.

Download this project as a .zip file Download this project as a tar.gz file


Travis Releases Bintray JitPack CodeCov VersionEye

A Log wrapper for Android applications, which simplifies and redefines the way of printing a log.

About Android Log

The order in terms of verbosity, from least to most is ERROR, WARN, INFO, DEBUG, VERBOSE. Verbose should never be compiled into an application except during development. Debug logs are compiled in but stripped at runtime. Error, warning and info logs are always kept.

Don’t print anything log if possible, especially after released!

If you still want to print logs, be careful.

Add Dependencies

From JCenter of Bintray:

dependencies {
    compile 'org.no_creativity.aar:ALog:0.4.0'

From JitPack:

allprojects {
    repositories {
        maven { url "" }
dependencies {
    compile ''


The ALog should be extended like this:

public class A extends ALog {
    public static final String TAG = "YourGlobalTag";
    public static final ALog log = new A(TAG);

    private A(String tag) {
        super(tag, BuildConfig.DEBUG);

And the class A should be used like this:

    // Print only when debug.
    A.log.v(); // Print the file and method name.
    A.log.d("Message"); // Print the message with the file and method name.

    // Print complicated information when debug.

    // Print always.
    A.log.e(exception); // Print the exception message.

    // Crash when debug, or print when release.; // Print stack traces."Message"); // Print the failure message.

Finally, the logs could be filtered like this:

adb logcat -s YourGlobalTag

You can find more detail in JavaDoc.

Version Information

GitHub tag commits-since

Name Version
targetSdkVersion 24
minSdkVersion 8



MIT License

Copyright (c) 2017 Yan QiDong