|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tomcat.core.BaseInterceptor
org.apache.tomcat.modules.config.LogSetter
Define a logger with the specified name, using the logger implementation in org.apache.tomcat.util.log.QueueLogger Tomcat uses the util.log.Log class - if you want to use a different logger ( like log4j or jsrXXX ) you need to create a new interceptor that will use your favorite logger and create a small adapter ( class extending Log and directing the output to your favorite logger. The only contract used in tomcat for logging is the util.Log.
Field Summary |
Fields inherited from class org.apache.tomcat.core.BaseInterceptor |
cm, ct, ctx, debug, DECLINED, loghelper, OK |
Constructor Summary | |
LogSetter()
|
Method Summary | |
void |
addContext(ContextManager cm,
Context ctx)
Set default ServletLog for Context if necessary |
void |
addInterceptor(ContextManager cm,
Context ctx,
BaseInterceptor module)
The log will be added and opened as soon as the module is added to the server |
void |
engineInit(ContextManager cm)
Initialize the module. |
void |
engineShutdown(ContextManager cm)
Shut down the module. |
void |
setName(java.lang.String s)
Set the name of the logger. |
void |
setPath(java.lang.String s)
|
void |
setServletLogger(boolean b)
This logger will be used for servlet's log. |
void |
setTimestampFormat(java.lang.String s)
Set the format of the timestamp. |
void |
setTimestamps(boolean b)
Display the time of the event ( log ). |
void |
setVerbosityLevel(java.lang.String s)
|
Methods inherited from class org.apache.tomcat.core.BaseInterceptor |
addContainer, addHandler, addSecurityConstraint, afterBody, authenticate, authorize, beforeBody, beforeCommit, contextInit, contextMap, contextShutdown, contextState, engineStart, engineState, engineStop, findSession, getContext, getContextManager, getDebug, getInfo, getLog, getNote, getNote, handleError, log, log, log, log, postReadRequest, postRequest, postService, postServletDestroy, postServletInit, preService, preServletDestroy, preServletInit, registerHooks, reload, removeContainer, removeContext, removeHandler, removeInterceptor, requestMap, sessionState, setContext, setContextManager, setDebug, setInfo, setNote, setNote |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public LogSetter()
Method Detail |
public void setName(java.lang.String s)
public void setPath(java.lang.String s)
public void setVerbosityLevel(java.lang.String s)
public void setServletLogger(boolean b)
public void setTimestamps(boolean b)
public void setTimestampFormat(java.lang.String s)
public void addInterceptor(ContextManager cm, Context ctx, BaseInterceptor module) throws TomcatException
addInterceptor
in class BaseInterceptor
cm
- the serverctx
- not null if this is a local interceptormodule
- the new added interceptor
TomcatException
- The module will not be added if any
module throws an exception.public void engineInit(ContextManager cm) throws TomcatException
BaseInterceptor
engineInit
in class BaseInterceptor
TomcatException
- The module will not be added if any
exception is thrown by engineInit.public void engineShutdown(ContextManager cm) throws TomcatException
BaseInterceptor
engineShutdown
in class BaseInterceptor
TomcatException
public void addContext(ContextManager cm, Context ctx) throws TomcatException
addContext
in class BaseInterceptor
TomcatException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |