public class EclipseLogAppender
extends ch.qos.logback.core.AppenderBase<ch.qos.logback.classic.spi.ILoggingEvent>
<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>
| Modifier and Type | Field and Description |
|---|---|
static String |
DEFAULT_BUNDLE_SYMBOLIC_NAME |
| Constructor and Description |
|---|
EclipseLogAppender() |
| Modifier and Type | Method and Description |
|---|---|
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.
|
addFilter, clearAllFilters, doAppend, getCopyOfAttachedFiltersList, getFilterChainDecision, getName, isStarted, setName, stop, toStringaddError, addError, addInfo, addInfo, addStatus, addWarn, addWarn, getContext, getDeclaredOrigin, getStatusManager, setContextpublic static final String DEFAULT_BUNDLE_SYMBOLIC_NAME
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()
Copyright © 2012–2016. All rights reserved.