|
|||||||||
| 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<ch.qos.logback.classic.spi.ILoggingEvent>
ch.qos.logback.contrib.eclipse.EclipseLogAppender
public class EclipseLogAppender
An appender that wraps the Eclipse platform logging facility and redirects messages to Eclipse's Error Log. Sample logback configuration:
<configuration>
<appender name="eclipse" class="ch.qos.logback.contrib.EclipseLogAppender">
<encoder>
<pattern>[%method] > %msg%n</pattern>
</encoder>
<!-- optional: bundle whose logger will be used for displaying messages -->
<bundleName>com.example.e4.helloworld</bundleName>
</appender>
<root level="TRACE">
<appender-ref ref="eclipse" />
</root>
</configuration>
| Field Summary | |
|---|---|
static String |
DEFAULT_BUNDLE_SYMBOLIC_NAME
|
| Fields inherited from class ch.qos.logback.core.AppenderBase |
|---|
name, started |
| Fields inherited from class ch.qos.logback.core.spi.ContextAwareBase |
|---|
context |
| Constructor Summary | |
|---|---|
EclipseLogAppender()
|
|
| Method Summary | |
|---|---|
protected void |
append(ch.qos.logback.classic.spi.ILoggingEvent event)
Writes an event to Eclipse's Error Log |
String |
getBundleName()
Gets the symbolic name of the Eclipse plugin bundle whose logger is used for logging messages |
ch.qos.logback.classic.encoder.PatternLayoutEncoder |
getEncoder()
Gets the pattern-layout encoder for this appender's log message |
protected IPlatform |
getPlatform()
Gets the Eclipse platform |
void |
setBundleName(String bundleName)
Sets the name of the Eclipse plugin bundle whose logger will be used for logging messages. |
void |
setEncoder(ch.qos.logback.classic.encoder.PatternLayoutEncoder encoder)
Sets the pattern-layout encoder for this appender's log message |
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 |
| Field Detail |
|---|
public static final String DEFAULT_BUNDLE_SYMBOLIC_NAME
| Constructor Detail |
|---|
public EclipseLogAppender()
| Method Detail |
|---|
public void start()
start in interface ch.qos.logback.core.spi.LifeCyclestart in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>protected void append(ch.qos.logback.classic.spi.ILoggingEvent event)
append in class ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>event - the event to be loggedpublic ch.qos.logback.classic.encoder.PatternLayoutEncoder getEncoder()
public void setEncoder(ch.qos.logback.classic.encoder.PatternLayoutEncoder encoder)
encoder - the pattern-layout encoderpublic String getBundleName()
public void setBundleName(String bundleName)
bundleName - the symbolic name of the Eclipse plugin bundleprotected IPlatform getPlatform()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||