Class JsonRequestLogger
- java.lang.Object
-
- org.apache.wicket.protocol.http.AbstractRequestLogger
-
- org.apache.wicket.extensions.requestlogger.JsonRequestLogger
-
- All Implemented Interfaces:
IRequestLogger
public class JsonRequestLogger extends AbstractRequestLogger
JsonRequestLogger uses Jackson to log requests in JSON-format. You will need jackson-mapper in your classpath, ie. like:<dependency> <groupId>com.fasterxml.jackson.core</groupId> <artifactId>jackson-databind</artifactId> <version>2.7.1</version> </dependency>
- Author:
- Emond Papegaaij
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.wicket.protocol.http.IRequestLogger
IRequestLogger.ISessionLogInfo, IRequestLogger.RequestData, IRequestLogger.SessionData
-
-
Constructor Summary
Constructors Constructor Description JsonRequestLogger()
Construct.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected String
getLogString(IRequestLogger.RequestData rd, IRequestLogger.SessionData sd)
protected com.fasterxml.jackson.databind.ObjectMapper
getMapper()
protected void
log(IRequestLogger.RequestData rd, IRequestLogger.SessionData sd)
-
Methods inherited from class org.apache.wicket.protocol.http.AbstractRequestLogger
addRequest, formatDate, getAverageRequestTime, getCurrentActiveRequestCount, getCurrentRequest, getLiveSessions, getPeakActiveRequestCount, getPeakSessions, getRequests, getRequestsPerMinute, getTotalCreatedSessions, logEventTarget, logRequestedUrl, logResponseTarget, objectCreated, objectRemoved, objectUpdated, performLogging, requestTime, sessionCreated, sessionDestroyed
-
-
-
-
Constructor Detail
-
JsonRequestLogger
public JsonRequestLogger()
Construct.
-
-
Method Detail
-
getMapper
protected com.fasterxml.jackson.databind.ObjectMapper getMapper()
- Returns:
- The mapper used to serialize the log data
-
log
protected void log(IRequestLogger.RequestData rd, IRequestLogger.SessionData sd)
- Specified by:
log
in classAbstractRequestLogger
-
getLogString
protected String getLogString(IRequestLogger.RequestData rd, IRequestLogger.SessionData sd)
-
-