|
Jalopy 1.0b10 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.log4j.AppenderSkeleton | +--de.hunsicker.jalopy.plugin.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 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(LoggingEvent ev)
Does the actual outputting. |
protected boolean |
checkEntryConditions()
{@inheritDoc} |
void |
close()
{@inheritDoc} |
void |
done()
{@inheritDoc} |
MatchResult |
parseMessage(LoggingEvent ev)
Parses the given message. |
boolean |
requiresLayout()
{@inheritDoc} |
void |
setName(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 Pattern regex
filename:lineno:text
) the pattern will match.Constructor Detail |
public AbstractAppender()
ChainingRuntimeException
- DOCUMENT ME!Method Detail |
public abstract void append(LoggingEvent ev)
append
in class AppenderSkeleton
ev
- logging event.public final void setName(String name)
setName
in interface Appender
setName
in class AppenderSkeleton
name
- appender name (ignored).public void close()
close
in interface Appender
close
in class AppenderSkeleton
public void done()
done
in interface SwingAppender
public MatchResult parseMessage(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 Appender
requiresLayout
in class AppenderSkeleton
true
.protected boolean checkEntryConditions()
true
.
|
Jalopy 1.0b10 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |