|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.catalina.valves.ValveBase
com.sun.enterprise.web.PEAccessLogValve
public final class PEAccessLogValve
Implementation of the Valve interface that generates a web server
access log with the detailed line contents matching a configurable pattern.
The syntax of the available patterns is similar to that supported by the
Apache mod_log_config module. As an additional feature,
automatic rollover of log files at a specified interval is also supported.
ByteBuffer to store and write
logs.
| Field Summary |
|---|
| Fields inherited from class org.apache.catalina.valves.ValveBase |
|---|
container, controller, debug, domain, lifecycle, mserver, next, oname, sm, started |
| Fields inherited from interface org.apache.catalina.Lifecycle |
|---|
AFTER_START_EVENT, AFTER_STOP_EVENT, BEFORE_START_EVENT, BEFORE_STOP_EVENT, INIT_EVENT, START_EVENT, STOP_EVENT |
| Fields inherited from interface org.glassfish.web.valve.GlassFishValve |
|---|
END_PIPELINE, INVOKE_NEXT |
| Constructor Summary | |
|---|---|
PEAccessLogValve()
|
|
| Method Summary | |
|---|---|
void |
addLifecycleListener(LifecycleListener listener)
Add a lifecycle event listener to this component. |
java.util.List<LifecycleListener> |
findLifecycleListeners()
Gets the (possibly empty) list of lifecycle listeners associated with this PEAccessLogValve. |
int |
geRotationInterval()
Return rotation interval |
int |
getBufferSize()
Return the direct ByteBuffer size |
java.lang.String |
getCondition()
Return whether the attribute name to look for when performing conditional loggging. |
java.lang.String |
getDirectory()
Return the directory in which we create log files. |
java.lang.String |
getFileDateFormat()
Return the date format date based log rotation. |
java.lang.String |
getInfo()
Return descriptive information about this implementation. |
java.lang.String |
getPrefix()
Return the log file prefix. |
java.lang.String |
getSuffix()
Return the log file suffix. |
int |
getWriterInterval()
Return writerThread interval (seconds) |
int |
invoke(Request request,
Response response)
Log a message summarizing the specified request and response, according to the format specified by the pattern property. |
boolean |
isResolveHosts()
Get the value of the resolve hosts flag. |
boolean |
isRotatable()
Should we rotate the logs |
void |
log()
Log the specified message to the log file, switching files if the date has changed since the previous log call. |
void |
postInvoke(Request request,
Response response)
|
void |
removeLifecycleListener(LifecycleListener listener)
Remove a lifecycle event listener from this component. |
void |
run()
The background writerThread that checks for write the log. |
void |
setAddDateStampToFirstAccessLogFile(boolean add)
Are we supposed to add datestamp to first access log file we create, or only starting with first rotation? |
void |
setBufferSize(int size)
Set the direct ByteBuffer size |
void |
setCondition(java.lang.String condition)
Set the ServletRequest.attribute to look for to perform conditional logging. |
void |
setDirectory(java.lang.String directory)
Set the directory in which we create log files. |
void |
setFileDateFormat(java.lang.String fileDateFormat)
Set the date format date based log rotation. |
void |
setPattern(java.lang.String p)
Set the format pattern, first translating any recognized alias. |
void |
setPrefix(java.lang.String p)
Set the log file prefix. |
void |
setResolveHosts(boolean resolveHosts)
Set the resolve hosts flag. |
void |
setRotatable(boolean rotatable)
Set the value is we should we rotate the logs |
void |
setRotationInterval(int t)
Set rotation interval |
void |
setSuffix(java.lang.String s)
Set the log file suffix. |
void |
setWriterInterval(int t)
Set writerthread interval (seconds) |
void |
start()
Prepare for the beginning of active use of the public methods of this component. |
void |
stop()
Gracefully terminate the active use of the public methods of this component. |
| Methods inherited from class org.apache.catalina.valves.ValveBase |
|---|
backgroundProcess, createObjectName, event, getContainer, getContainerName, getController, getDebug, getDomain, getNext, getObjectName, getParentName, invoke, isStarted, postDeregister, postRegister, preDeregister, preRegister, setContainer, setController, setDebug, setNext, setObjectName |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public PEAccessLogValve()
| Method Detail |
|---|
public int getWriterInterval()
public void setWriterInterval(int t)
public int geRotationInterval()
public void setRotationInterval(int t)
public void setBufferSize(int size)
ByteBuffer size
public int getBufferSize()
ByteBuffer size
public void setAddDateStampToFirstAccessLogFile(boolean add)
public java.lang.String getDirectory()
public void setDirectory(java.lang.String directory)
directory - The new log file directorypublic java.lang.String getInfo()
getInfo in interface ValvegetInfo in interface GlassFishValvegetInfo in class ValveBasepublic void setPattern(java.lang.String p)
p - The new patternpublic java.lang.String getPrefix()
public void setPrefix(java.lang.String p)
p - prefix The new log file prefixpublic boolean isRotatable()
public void setRotatable(boolean rotatable)
rotatable - true is we should rotate.public java.lang.String getSuffix()
public void setSuffix(java.lang.String s)
s - suffix The new log file suffixpublic void setResolveHosts(boolean resolveHosts)
resolveHosts - The new resolve hosts valuepublic boolean isResolveHosts()
public java.lang.String getCondition()
public void setCondition(java.lang.String condition)
condition - Set to null to log everythingpublic java.lang.String getFileDateFormat()
public void setFileDateFormat(java.lang.String fileDateFormat)
public int invoke(Request request,
Response response)
pattern property.
invoke in interface GlassFishValveinvoke in class ValveBaserequest - Request being processedresponse - Response being processed
public void postInvoke(Request request,
Response response)
throws java.io.IOException
postInvoke in interface GlassFishValvepostInvoke in class ValveBasejava.io.IOException
public void log()
throws java.io.IOException
java.io.IOExceptionpublic void addLifecycleListener(LifecycleListener listener)
addLifecycleListener in interface LifecycleaddLifecycleListener in class ValveBaselistener - The listener to addpublic java.util.List<LifecycleListener> findLifecycleListeners()
findLifecycleListeners in interface LifecyclefindLifecycleListeners in class ValveBasepublic void removeLifecycleListener(LifecycleListener listener)
removeLifecycleListener in interface LifecycleremoveLifecycleListener in class ValveBaselistener - The listener to add
public void start()
throws LifecycleException
configure(),
and before any of the public methods of the component are utilized.
start in interface Lifecyclestart in class ValveBaseLifecycleException - if this component detects a fatal error
that prevents this component from being used
public void stop()
throws LifecycleException
stop in interface Lifecyclestop in class ValveBaseLifecycleException - if this component detects a fatal error
that needs to be reportedpublic void run()
run in interface java.lang.Runnable
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||