|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.sling.engine.impl.log.RequestLogger
@Properties(value={@Property(name="service.description",value="Request Logger"),@Property(name="service.vendor",value="The Apache Software Foundation")}) @Service(value=RequestLogger.class) @Reference(name="RequestLoggerService", referenceInterface=RequestLoggerService.class, cardinality=OPTIONAL_MULTIPLE, policy=DYNAMIC) public class RequestLogger
The RequestLogger
is a request level filter, which
provides customizable logging or requests handled by Sling. This filter is
inserted as the first filter in the request level filter chain and therefore
is the first filter called when processing a request and the last filter
acting just before the request handling terminates.
Field Summary | |
---|---|
static String |
PROP_ACCESS_LOG_ENABLED
|
static String |
PROP_ACCESS_LOG_OUTPUT
|
static String |
PROP_ACCESS_LOG_OUTPUT_TYPE
|
static String |
PROP_REQUEST_LOG_ENABLED
|
static String |
PROP_REQUEST_LOG_OUTPUT
|
static String |
PROP_REQUEST_LOG_OUTPUT_TYPE
|
Constructor Summary | |
---|---|
RequestLogger()
|
Method Summary | |
---|---|
protected void |
activate(org.osgi.service.component.ComponentContext osgiContext)
Activates this component by setting up the special request entry and exit request loggers and the access logger as configured in the context properties. |
protected void |
bindRequestLoggerService(RequestLoggerService requestLoggerService)
Binds a RequestLoggerService to be used during request
filter. |
protected void |
deactivate(org.osgi.service.component.ComponentContext osgiContext)
Deactivates this component by unbinding and shutting down all loggers setup during activation and finally dispose off the FileRequestLog class to make sure all shared writers are
closed. |
void |
logRequestEntry(SlingHttpServletRequest request,
SlingHttpServletResponse response)
|
void |
logRequestExit(SlingHttpServletRequest request,
SlingHttpServletResponse response)
|
protected void |
unbindRequestLoggerService(RequestLoggerService requestLoggerService)
Binds a RequestLoggerService to be used during request
filter. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
@Property(value="logs/request.log") public static final String PROP_REQUEST_LOG_OUTPUT
@Property(intValue=0, options={@PropertyOption(name="0",value="Logger Name"),@PropertyOption(name="1",value="File Name"),@PropertyOption(name="2",value="RequestLog Service")}) public static final String PROP_REQUEST_LOG_OUTPUT_TYPE
@Property(boolValue=true) public static final String PROP_REQUEST_LOG_ENABLED
@Property(value="logs/access.log") public static final String PROP_ACCESS_LOG_OUTPUT
@Property(intValue=0, options={@PropertyOption(name="0",value="Logger Name"),@PropertyOption(name="1",value="File Name"),@PropertyOption(name="2",value="RequestLog Service")}) public static final String PROP_ACCESS_LOG_OUTPUT_TYPE
@Property(boolValue=true) public static final String PROP_ACCESS_LOG_ENABLED
Constructor Detail |
---|
public RequestLogger()
Method Detail |
---|
public void logRequestEntry(SlingHttpServletRequest request, SlingHttpServletResponse response)
public void logRequestExit(SlingHttpServletRequest request, SlingHttpServletResponse response)
protected void activate(org.osgi.service.component.ComponentContext osgiContext)
FileRequestLog
class is
initialized with the value of the sling.home
context
property to resolve relative log file names.
osgiContext
- The OSGi Component Context providing the configuration
data and access into the system.protected void deactivate(org.osgi.service.component.ComponentContext osgiContext)
FileRequestLog
class to make sure all shared writers are
closed.
osgiContext
- The OSGi Component Context providing the configuration
data and access into the system.protected void bindRequestLoggerService(RequestLoggerService requestLoggerService)
RequestLoggerService
to be used during request
filter.
requestLoggerService
- The RequestLoggerService
to
use.protected void unbindRequestLoggerService(RequestLoggerService requestLoggerService)
RequestLoggerService
to be used during request
filter.
requestLoggerService
- The RequestLoggerService
to
use.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |