|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.log4j.AppenderSkeleton org.goetz.domino.log4j.AbstractAppender
This is the base appender for a log4j agent and servlet appender implementation that log to a Domino database using a memory buffer and delayed writing.
Field Summary | |
protected LogDocument |
doc
|
Fields inherited from class org.apache.log4j.AppenderSkeleton |
closed, errorHandler, headFilter, layout, name, tailFilter, threshold |
Constructor Summary | |
AbstractAppender()
Creates a new DominoAppender. |
Method Summary | |
protected void |
addEvent(org.apache.log4j.spi.LoggingEvent event)
Writes the log entry to the notes document. |
void |
append(org.apache.log4j.spi.LoggingEvent event)
Appends the specified event to this DominoAppender. |
protected boolean |
checkEntryConditions(org.apache.log4j.spi.LoggingEvent event)
Test if this Appender can append LoggingEvents. |
void |
close()
Closes this appender. |
java.lang.String |
getApplicationName()
Returns the application name under which the log entries appear. |
java.lang.String |
getDatabase()
Returns the databaseName name. |
int |
getFlushTimeout()
|
java.lang.String |
getFormName()
Returns the form name. |
org.apache.log4j.Layout |
getLayout()
Returns the Layout used by this Appender. |
protected lotus.domino.Document |
getLogDocument(lotus.domino.Database db)
Returns the Domino Document that the current LoggingEvents should be written to. |
int |
getMaxLines()
Sets the internal buffer size. |
java.lang.String |
getMessage()
Returns the currently set message. |
java.lang.String |
getServer()
Returns the serverName name. |
protected abstract void |
initialize(org.apache.log4j.spi.LoggingEvent event)
Initializes application name and path. |
protected java.lang.String |
replace(java.lang.String s,
java.lang.String oldPattern,
java.lang.String newPattern)
Replace a pattern in a string with Java 1.3. |
boolean |
requiresLayout()
Always returns false. |
void |
setApplicationName(java.lang.String appName)
Sets the name under which the log entries appear. |
void |
setDatabase(java.lang.String databaseName)
Sets the databaseName path to log to. |
void |
setFlushTimeout(int flushTimeout)
|
void |
setFormName(java.lang.String formName)
Sets the form from the log4j properties. |
void |
setMaxLines(int maxLines)
Sets the internal buffer size. |
void |
setMessage(java.lang.String message)
Reads the message property that contains a pattern converter layout including an additional variable: %u for agent user. |
void |
setServer(java.lang.String serverName)
Sets the Domino serverName to log to. |
Methods inherited from class org.apache.log4j.AppenderSkeleton |
activateOptions, addFilter, clearFilters, doAppend, finalize, getErrorHandler, getFilter, getFirstFilter, getName, getThreshold, isAsSevereAsThreshold, setErrorHandler, setLayout, setName, setThreshold |
Methods inherited from class java.lang.Object |
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected LogDocument doc
Constructor Detail |
public AbstractAppender()
Method Detail |
public void setMessage(java.lang.String message)
message
- the pattern layoutpublic java.lang.String getMessage()
public void setApplicationName(java.lang.String appName)
appName
- application namepublic java.lang.String getApplicationName()
public void setFormName(java.lang.String formName)
public java.lang.String getFormName()
public void setMaxLines(int maxLines)
public int getMaxLines()
public void setServer(java.lang.String serverName)
serverName
- the server name where the databaseName to log to is on.public java.lang.String getServer()
public java.lang.String getDatabase()
public void setDatabase(java.lang.String databaseName)
databaseName
- the path to the databaseName to log to.public int getFlushTimeout()
public void setFlushTimeout(int flushTimeout)
public boolean requiresLayout()
public org.apache.log4j.Layout getLayout()
protected boolean checkEntryConditions(org.apache.log4j.spi.LoggingEvent event) throws lotus.domino.NotesException
event
- the LoggingEvent to process.
lotus.domino.NotesException
protected void addEvent(org.apache.log4j.spi.LoggingEvent event) throws lotus.domino.NotesException
event
- the LoggingEvent to act on.
lotus.domino.NotesException
- if the Appender could not
write to the current Document.protected abstract void initialize(org.apache.log4j.spi.LoggingEvent event) throws java.lang.Exception
initAppend()
and releaseAppend()
which are
being called each log append
call.
java.lang.Exception
public void append(org.apache.log4j.spi.LoggingEvent event)
event
- the LoggingEvent to append.protected lotus.domino.Document getLogDocument(lotus.domino.Database db) throws lotus.domino.NotesException
lotus.domino.NotesException
public void close()
protected java.lang.String replace(java.lang.String s, java.lang.String oldPattern, java.lang.String newPattern)
s
- is the original String which may contain substring aOldPatternoldPattern
- is the non-empty substring which is to be replacednewPattern
- is the replacement for aOldPattern
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |