public abstract class Tree extends Object
Timber.plant().| Constructor and Description |
|---|
Tree() |
| Modifier and Type | Method and Description |
|---|---|
protected String |
createStackElementTag(StackTraceElement element)
Extract the tag which should be used for the message from the
element. |
void |
debug(String message,
Object... args)
Log a debug message with optional format args.
|
void |
debug(Throwable t,
String message,
Object... args)
Log a debug exception and a message with optional format args.
|
void |
error(String message,
Object... args)
Log an error message with optional format args.
|
void |
error(Throwable t,
String message,
Object... args)
Log an error exception and a message with optional format args.
|
void |
fatal(String message,
Object... args)
Log a fatal message with optional format args.
|
void |
fatal(Throwable t,
String message,
Object... args)
Log a fatal exception and a message with optional format args.
|
protected String |
formatLine(Level level,
String tag,
String message) |
protected String |
getStackTraceString(Throwable t) |
protected String |
getTag() |
void |
info(String message,
Object... args)
Log an info message with optional format args.
|
void |
info(Throwable t,
String message,
Object... args)
Log an info exception and a message with optional format args.
|
protected boolean |
isLoggeable(Level level)
Return whether a message at
level should be logged. |
void |
log(Level level,
String message,
Object... args)
Log at
level a message with optional format args. |
protected abstract void |
log(Level level,
String tag,
String message,
Throwable t)
Write a log message to its destination.
|
void |
log(Level level,
Throwable t,
String message,
Object... args)
Log at
level an exception and a message with optional format args. |
protected void |
prepareLog(Level level,
Throwable t,
String message,
Object... args) |
void |
setDateFormatPattern(String pattern) |
void |
trace(String message,
Object... args)
Log a trace message with optional format args.
|
void |
trace(Throwable t,
String message,
Object... args)
Log a trace exception and a message with optional format args.
|
void |
warn(String message,
Object... args)
Log a warn message with optional format args.
|
void |
warn(Throwable t,
String message,
Object... args)
Log a warn exception and a message with optional format args.
|
protected final String NL
protected String getTag()
public void trace(String message, Object... args)
public void trace(Throwable t, String message, Object... args)
public void debug(String message, Object... args)
public void debug(Throwable t, String message, Object... args)
public void info(String message, Object... args)
public void info(Throwable t, String message, Object... args)
public void warn(Throwable t, String message, Object... args)
public void error(String message, Object... args)
public void error(Throwable t, String message, Object... args)
public void fatal(String message, Object... args)
public void fatal(Throwable t, String message, Object... args)
public void log(Level level, String message, Object... args)
level a message with optional format args.public void log(Level level, Throwable t, String message, Object... args)
level an exception and a message with optional format args.protected boolean isLoggeable(Level level)
level should be logged.protected String createStackElementTag(StackTraceElement element)
element. By default
this will use the class name without any anonymous class suffixes (e.g., Foo$1
becomes Foo).
Note: This will not be called if a manual tag was specified.
public final void setDateFormatPattern(String pattern)
protected abstract void log(Level level, String tag, String message, Throwable t)
level - Log level. See Level for constants.tag - Explicit or inferred tag. May be null.message - Formatted log message. May be null, but then t will not be.t - Accompanying exceptions. May be null, but then message will not be.Copyright © 2016. All rights reserved.