|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectch.qos.logback.core.spi.ContextAwareBase
ch.qos.logback.core.AppenderBase<ILoggingEvent>
ch.qos.logback.core.android.LogcatAppender
public class LogcatAppender
An appender that wraps the native Android logging mechanism (logcat); redirects all logging requests to logcat
Note:
The output of logcat is ultimately controlled by the OS.
Therefore, even if a logger is at Level.DEBUG, calling Logger.debug() (which
invokes android.os.util.Log.d()) does not log a message if logcat
filtering prevents it. See the Android Developer Guide for details on adjusting
the logcat filter.
http://developer.android.com/guide/developing/tools/adb.html#filteringoutput| Field Summary |
|---|
| Fields inherited from class ch.qos.logback.core.AppenderBase |
|---|
name, started |
| Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase |
|---|
context |
| Constructor Summary | |
|---|---|
LogcatAppender()
As in most cases, the default constructor does nothing. |
|
| Method Summary | |
|---|---|
void |
append(ILoggingEvent event)
Writes an event to Android's logging mechanism (logcat) |
PatternLayoutEncoder |
getEncoder()
Gets the pattern-layout encoder for this appender's logcat message |
PatternLayoutEncoder |
getTagEncoder()
Gets the pattern-layout encoder for this appender's logcat tag |
void |
setEncoder(PatternLayoutEncoder encoder)
Sets the pattern-layout encoder for this appender's logcat message |
void |
setTagEncoder(PatternLayoutEncoder encoder)
Sets the pattern-layout encoder for this appender's logcat tag |
void |
start()
Checks that required parameters are set, and if everything is in order, activates this appender. |
| Methods inherited from class ch.qos.logback.core.AppenderBase |
|---|
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, stop, toString |
| Methods inherited from class ch.qos.logback.core.spi.ContextAwareBase |
|---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ch.qos.logback.core.spi.ContextAware |
|---|
addError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, setContext |
| Constructor Detail |
|---|
public LogcatAppender()
| Method Detail |
|---|
public void start()
start in interface LifeCyclestart in class AppenderBase<ILoggingEvent>public void append(ILoggingEvent event)
append in class AppenderBase<ILoggingEvent>event - the event to be loggedpublic PatternLayoutEncoder getEncoder()
public void setEncoder(PatternLayoutEncoder encoder)
encoder - the pattern-layout encoderpublic PatternLayoutEncoder getTagEncoder()
public void setTagEncoder(PatternLayoutEncoder encoder)
The expanded text of the pattern must be less than 23 characters as limited by Android. Layouts that exceed this limit are truncated, and a star is appended to the tag to indicate this.
encoder - the pattern-layout encoder; specify null to
automatically use the logger's name as the tag
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||