|
|||||||||
| Home >> All >> de >> hunsicker >> jalopy >> [ plugin overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
de.hunsicker.jalopy.plugin
Class AbstractAppender

java.lang.Objectorg.apache.log4j.AppenderSkeleton
de.hunsicker.jalopy.plugin.AbstractAppender
- All Implemented Interfaces:
- org.apache.log4j.Appender, org.apache.log4j.spi.OptionHandler, SwingAppender
- public abstract class AbstractAppender
- extends org.apache.log4j.AppenderSkeleton
- implements SwingAppender
- extends org.apache.log4j.AppenderSkeleton
Skeleton implementation of an appender which outputs messages in a visual component.
- Version:
- $Revision: 1.4 $
| Field Summary | |
private org.apache.oro.text.regex.PatternMatcher |
_matcher
Matcher instance. |
private static java.lang.String |
APPENDER_NAME
Name of the appender for output messages. |
private static java.lang.String |
PATTERN
Regex to apply for Emacs-style messages. |
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 org.apache.oro.text.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()
null |
void |
close()
null |
void |
done()
null |
org.apache.oro.text.regex.MatchResult |
parseMessage(org.apache.log4j.spi.LoggingEvent ev)
Parses the given message. |
boolean |
requiresLayout()
null |
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 |
POS_FILENAME
public static final int POS_FILENAME
- Position of the filename in the regex result.
- See Also:
- Constant Field Values
POS_LINE
public static final int POS_LINE
- Position of the lineno in the regex result.
- See Also:
- Constant Field Values
POS_TEXT
public static final int POS_TEXT
- Position of the message text in the regex result.
- See Also:
- Constant Field Values
POS_COLUMN
public static final int POS_COLUMN
- Position of the message text in the regex result.
- See Also:
- Constant Field Values
APPENDER_NAME
private static final java.lang.String APPENDER_NAME
- Name of the appender for output messages.
- See Also:
- Constant Field Values
PATTERN
private static final java.lang.String PATTERN
- Regex to apply for Emacs-style messages. Messages must comply to the
filename:line:column:text pattern.
- See Also:
- Constant Field Values
regex
protected final org.apache.oro.text.regex.Pattern regex
- The regex to parse the messages. If messages have a format similiar to Emacs
messages (
filename:lineno:text) the pattern will match.
_matcher
private org.apache.oro.text.regex.PatternMatcher _matcher
- Matcher instance.
| Constructor Detail |
AbstractAppender
public AbstractAppender()
- Creates a new AbstractAppender object.
| Method Detail |
append
public abstract void append(org.apache.log4j.spi.LoggingEvent ev)
- Does the actual outputting.
setName
public final void setName(java.lang.String name)
- Sets the name of the appender. Overidden so that the initial name can't be
changed.
- Specified by:
setNamein interfaceorg.apache.log4j.Appender
close
public void close()
- null
- Specified by:
closein interfaceorg.apache.log4j.Appender
done
public void done()
- null
- Specified by:
donein interfaceSwingAppender
parseMessage
public org.apache.oro.text.regex.MatchResult parseMessage(org.apache.log4j.spi.LoggingEvent ev)
- Parses the given message. To access the parsed information one may typically use:
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); ... }
requiresLayout
public boolean requiresLayout()
- null
- Specified by:
requiresLayoutin interfaceorg.apache.log4j.Appender
checkEntryConditions
protected boolean checkEntryConditions()
- null
|
|||||||||
| Home >> All >> de >> hunsicker >> jalopy >> [ plugin overview ] | PREV CLASS NEXT CLASS | ||||||||
SUMMARY: JAVADOC | SOURCE | DOWNLOAD | NESTED | FIELD | CONSTR | METHOD |
DETAIL: FIELD | CONSTR | METHOD | ||||||||
JAVADOC