We are trying to get the server name, session id browser info... to keep the information in the MDC for logging.
For this we are trying to add a listener in the RequestCycle
of the onBeginRequest()
of IRequestCycleListener
.
I have added a class as follows:
public class RequestRListener implements IRequestCycleListener
{
@Override
public void onBeginRequest(RequestCycle cycle)
{
//TODO
}
}
Now where to add the listener to get the above mentioned informations ?