Package org.bedework.util.servlet
Interface HttpAppLogger
-
- All Superinterfaces:
org.bedework.util.logging.Logged
public interface HttpAppLogger extends org.bedework.util.logging.LoggedInterface defining some logging methods for http applications.getLogEntry, logInfo, logRequest, logSessionCounts provide information for usage statistics of web applications.
- Author:
- Mike Douglass douglm@rpi.edu
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classHttpAppLogger.LogEntry
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default voidemitLogEntry(HttpAppLogger.LogEntry entry)Emit the log entrydefault HttpAppLogger.LogEntrygetLogEntry(javax.servlet.http.HttpServletRequest request, String logname)Return a LogEntry containing the start of a log entry.StringgetLogPrefix(javax.servlet.http.HttpServletRequest request)Get a prefix for the loggers.default StringgetSessionId(javax.servlet.http.HttpServletRequest request)Get the session id for the loggers.default voidlogInfo(javax.servlet.http.HttpServletRequest request, String logname, String info)Log some information.default voidlogRequest(javax.servlet.http.HttpServletRequest request)Log the request - virtual domains can make it difficult to distinguish applications.default voidlogRequestOut(javax.servlet.http.HttpServletRequest request)Log the request on the way out.default voidlogSessionCounts(javax.servlet.http.HttpServletRequest request, boolean start, long sessionNum, long sessions)Log the session counters for applications that maintain them.-
Methods inherited from interface org.bedework.util.logging.Logged
audit, debug, debug, enableAuditLogger, enableErrorLogger, enableMetricsLogger, error, error, error, getLogger, getLogLevel, info, isAuditLoggerEnabled, isErrorLoggerEnabled, isMetricsDebugEnabled, isMetricsLoggerEnabled, metrics, setLoggerClass, setLoggerClass, setLogLevel, trace, trace, warn
-
-
-
-
Method Detail
-
getLogEntry
default HttpAppLogger.LogEntry getLogEntry(javax.servlet.http.HttpServletRequest request, String logname)
Return a LogEntry containing the start of a log entry.- Parameters:
request- HttpServletRequestlogname- String name for the log entry- Returns:
- LogEntry containing prefix
-
logInfo
default void logInfo(javax.servlet.http.HttpServletRequest request, String logname, String info)Log some information.- Parameters:
request- HttpServletRequestlogname- String name for the log entryinfo- String information to log
-
logRequest
default void logRequest(javax.servlet.http.HttpServletRequest request) throws ThrowableLog the request - virtual domains can make it difficult to distinguish applications.- Parameters:
request- HttpServletRequest- Throws:
Throwable- on error
-
logRequestOut
default void logRequestOut(javax.servlet.http.HttpServletRequest request) throws ThrowableLog the request on the way out.- Parameters:
request- HttpServletRequest- Throws:
Throwable- on error
-
logSessionCounts
default void logSessionCounts(javax.servlet.http.HttpServletRequest request, boolean start, long sessionNum, long sessions)Log the session counters for applications that maintain them.- Parameters:
request- HttpServletRequeststart- true for session startsessionNum- long number of sessionsessions- long number of concurrent sessions
-
getLogPrefix
String getLogPrefix(javax.servlet.http.HttpServletRequest request)
Get a prefix for the loggers.- Parameters:
request- HttpServletRequest- Returns:
- String log prefix
-
getSessionId
default String getSessionId(javax.servlet.http.HttpServletRequest request)
Get the session id for the loggers.- Parameters:
request- the incoming request to log- Returns:
- String session id
-
emitLogEntry
default void emitLogEntry(HttpAppLogger.LogEntry entry)
Emit the log entry
-
-