|
Jalopy 1.5b1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.log4j.AppenderSkeleton
de.hunsicker.jalopy.plugin.AbstractAppender
public abstract class AbstractAppender
Skeleton implementation of an appender which outputs messages in a visual component.
Field Summary | |
---|---|
static int |
POS_COLUMN
Position of the message text in the regex result. |
static int |
POS_FILENAME
Position of the filename in the regex result. |
static int |
POS_LINE
Position of the lineno in the regex result. |
static int |
POS_TEXT
Position of the message text in the regex result. |
protected java.util.regex.Pattern |
regex
The regex to parse the messages. |
Fields inherited from class org.apache.log4j.AppenderSkeleton |
---|
closed, errorHandler, headFilter, layout, name, tailFilter, threshold |
Constructor Summary | |
---|---|
AbstractAppender()
Creates a new AbstractAppender object. |
Method Summary | |
---|---|
abstract void |
append(org.apache.log4j.spi.LoggingEvent ev)
Does the actual outputting. |
protected boolean |
checkEntryConditions()
|
void |
close()
|
void |
done()
Notifies the appender that a run was finished. |
java.util.regex.Matcher |
parseMessage(org.apache.log4j.spi.LoggingEvent ev)
Parses the given message. |
boolean |
requiresLayout()
|
void |
setName(java.lang.String name)
Sets the name of the appender. |
Methods inherited from class org.apache.log4j.AppenderSkeleton |
---|
activateOptions, addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getLayout, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setThreshold |
Methods inherited from class java.lang.Object |
---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface de.hunsicker.jalopy.plugin.SwingAppender |
---|
clear |
Methods inherited from interface org.apache.log4j.Appender |
---|
addFilter, clearFilters, doAppend, getErrorHandler, getFilter, getLayout, getName, setErrorHandler, setLayout |
Field Detail |
---|
public static final int POS_FILENAME
public static final int POS_LINE
public static final int POS_TEXT
public static final int POS_COLUMN
protected final java.util.regex.Pattern regex
filename:lineno:text
) the pattern will match.
Constructor Detail |
---|
public AbstractAppender()
ChainingRuntimeException
- If an error occursMethod Detail |
---|
public abstract void append(org.apache.log4j.spi.LoggingEvent ev)
append
in class org.apache.log4j.AppenderSkeleton
ev
- logging event.public final void setName(java.lang.String name)
setName
in interface org.apache.log4j.Appender
setName
in class org.apache.log4j.AppenderSkeleton
name
- appender name (ignored).public void close()
close
in interface org.apache.log4j.Appender
public void done()
done
in interface SwingAppender
public java.util.regex.Matcher parseMessage(org.apache.log4j.spi.LoggingEvent ev)
MatchResult result = parseMessage(message); if (result == null) { // handle plain message ... } else { // this is an Emacs style message, you can easily access the // information String filename = result.group(POS_FILENAME); String line = result.group(POS_LINE); String column = result.group(POS_COLUMN); String text = result.group(POS_TEXT); ... }
ev
- logging event.
null
if the message doesn't match the
Emacs format filename:line:column:text
.public boolean requiresLayout()
requiresLayout
in interface org.apache.log4j.Appender
true
.protected boolean checkEntryConditions()
true
.
|
Jalopy 1.5b1 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |