-
Available since OmniFaces 3.0
The FacesRequestLogger is a PhaseListener which logs the Faces request detail as Level.INFO. The log format is as below:
method{url, user, action, params, messages, timer}
Where:
method: the HTTP request method, usuallyGETorPOST.url: the request URI with query string.user: the user detail, composed of:ip: the user IP, as obtained byFaces.getRemoteAddr().login: the user login, as obtained byFaces.getRemoteUser().session: the session ID, as obtained byFaces.getSessionId().viewState: the server side Faces view state identifier, if any.
action: the action detail, composed of:source: the action source, as obtained byComponents.getCurrentActionSource().event: the action event name, if any.methods: the action methods, as obtained byComponents.getActionExpressionsAndListeners(UIComponent)validationFailed: whether Faces validation has failed.
params: the HTTP request parameters whereby any parameters whose name matchesjakarta.faces.*are skipped, and whose name ends withpasswordortokenare masked with value********.messages: all Faces messages added so far.timer: the duration of each phase measured in milliseconds, or -1 if the phase has been skipped, composed of:0: total time.1: duration ofPhaseId.RESTORE_VIEW.2: duration ofPhaseId.APPLY_REQUEST_VALUES.3: duration ofPhaseId.PROCESS_VALIDATIONS.4: duration ofPhaseId.UPDATE_MODEL_VALUES.5: duration ofPhaseId.INVOKE_APPLICATION.6: duration ofPhaseId.RENDER_RESPONSE.
Installation
Register it as <phase-listener> in faces-config.xml.
<lifecycle>
<phase-listener>org.omnifaces.eventlistener.FacesRequestLogger</phase-listener>
</lifecycle>
Documentation & Sources