Java Code Examples for timber.log.Timber#Tree

The following examples show how to use timber.log.Timber#Tree . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: Utils.java    From AirMapSDK-Android with Apache License 2.0 5 votes vote down vote up
public static boolean timberContainsDebugTree() {
    for (Timber.Tree tree : Timber.forest()) {
        if (tree instanceof Timber.DebugTree) {
            return true;
        }
    }
    return false;
}
 
Example 2
Source File: LumberYard.java    From DebugDrawer with Apache License 2.0 5 votes vote down vote up
public Timber.Tree tree() {
    return new Timber.DebugTree() {
        @Override
        protected void log(int priority, String tag, String message, Throwable t) {
            addEntry(new LogEntry(priority, tag, message, LOG_DATE_PATTERN.format(Calendar.getInstance().getTime())));
        }
    };
}
 
Example 3
Source File: AboutPreferences.java    From openScale with GNU General Public License v3.0 5 votes vote down vote up
private FileDebugTree getEnabledFileDebugTree() {
    for (Timber.Tree tree : Timber.forest()) {
        if (tree instanceof FileDebugTree) {
            return (FileDebugTree) tree;
        }
    }
    return null;
}
 
Example 4
Source File: LumberYard.java    From debugdrawer with Apache License 2.0 5 votes vote down vote up
public Timber.Tree tree() {
    return new Timber.DebugTree() {
        @Override
        protected void log(int priority, String tag, String message, Throwable t) {
            addEntry(new LogEntry(priority, tag, message, LOG_DATE_PATTERN.format(Calendar.getInstance().getTime())));
        }
    };
}
 
Example 5
Source File: LumberYard.java    From u2020-mvp with Apache License 2.0 5 votes vote down vote up
public Timber.Tree tree() {
    return new Timber.DebugTree() {
        @Override protected void log(int priority, String tag, String message, Throwable t) {
            addEntry(new Entry(priority, tag, message));
        }
    };
}
 
Example 6
Source File: LumberYard.java    From u2020 with Apache License 2.0 5 votes vote down vote up
public Timber.Tree tree() {
  return new Timber.DebugTree() {
    @Override protected void log(int priority, String tag, String message, Throwable t) {
      addEntry(new Entry(priority, tag, message));
    }
  };
}
 
Example 7
Source File: AppModule.java    From Sky31Radio with Apache License 2.0 4 votes vote down vote up
@Provides
Timber.Tree provideTimberTree(){
    return BuildConfig.DEBUG ?
            new Timber.DebugTree() :
            new Timber.HollowTree();
}
 
Example 8
Source File: CocoApp.java    From COCOFramework with Apache License 2.0 2 votes vote down vote up
/**
 * Provide CrashTree for upload your app exception to online service
 *
 * @return
 */
protected Timber.Tree getCrashTree() {
    return null;
}