public class BaseTree
extends Timber.DebugTree
BaseTreeComponents dynamically| Constructor and Description |
|---|
BaseTree(android.content.Context applicationContext,
java.util.Set<java.lang.Integer> priorityFilterList)
Creates a
BaseTree to be used with Timber.Tree#plant(Timber.Tree) . |
| Modifier and Type | Method and Description |
|---|---|
BaseTree |
addComponent(BaseTreeComponent baseTreeComponent)
Adds a
BaseTreeComponent which will receive events and be able to react with custom logic. |
android.content.Context |
getApplicationContext() |
java.util.List<BaseTreeComponent> |
getComponents() |
protected void |
log(int priority,
java.lang.String tag,
java.lang.String message,
java.lang.Throwable t)
DOES NOT ACTUALLY LOG!
|
static java.lang.String |
mapPriorityToString(int priority)
Maps a
Log priority such as Log.INFO to a string. |
void |
reallyDoLog(int priority,
java.lang.String tag,
java.lang.String message,
java.lang.Throwable t)
Calls the
DebugTree's log method. |
BaseTree |
removeComponent(BaseTreeComponent baseTreeComponent)
Removes a
BaseTreeComponent which then will not receive any events anymore. |
BaseTree |
removeComponent(java.lang.Class clazz) |
BaseTree |
setEnabled(boolean isEnabled)
When disabled, no events will get forwarded.
|
boolean |
shouldLog(int priority) |
public BaseTree(@NonNull
android.content.Context applicationContext,
@NonNull
java.util.Set<java.lang.Integer> priorityFilterList)
BaseTree to be used with Timber.Tree#plant(Timber.Tree) .applicationContext - An application contextpriorityFilterList - A Set of priorities to filter, provide an empty Set to allow any prioritypublic BaseTree setEnabled(boolean isEnabled)
shouldLog(int) calls.isEnabled - Whether we should forward events or notBaseTree instance to allow chained calls@NonNull public android.content.Context getApplicationContext()
@NonNull public java.util.List<BaseTreeComponent> getComponents()
BaseTreeComponents.public BaseTree addComponent(BaseTreeComponent baseTreeComponent)
BaseTreeComponent which will receive events and be able to react with custom logic.baseTreeComponent - The BaseTreeComponent to addBaseTree instance to allow chained callspublic BaseTree removeComponent(BaseTreeComponent baseTreeComponent)
BaseTreeComponent which then will not receive any events anymore.baseTreeComponent - The BaseTreeComponent to removeBaseTree instance to allow chained callspublic BaseTree removeComponent(java.lang.Class clazz)
removeComponent(BaseTreeComponent)protected void log(int priority,
java.lang.String tag,
java.lang.String message,
java.lang.Throwable t)
timber.log.Timber.Tree#log(int, String, String, Throwable)public void reallyDoLog(int priority,
java.lang.String tag,
java.lang.String message,
java.lang.Throwable t)
DebugTree's log method.timber.log.Timber.DebugTree#log(int, String, String, Throwable)public boolean shouldLog(int priority)
priority - The priority, which should be loggedpublic static java.lang.String mapPriorityToString(int priority)
Log priority such as Log.INFO to a string.priority - The log priority to map