Well we are doing some performance testing to figure out what steps of our application take how much time. Of course easy to parse / filter logs with regexp are a charm. To the problem: Our jsf application is split into several projects, which are used by other (non jsf) applications. My first approach would have been:
if(logger.isDebugEnabled())
logger.debug("Service call took: " + (System.currentTimeMillis() - time)+ " JSESSIONID="+CookieUtil.getJsessionId(FacesContext.getCurrentInstance())) ;
(CookieUtil would read the sessionId from the HttpServletRequest)
But... obviously other projects don't like dependencies to JSF libraries, nor to my neat CookieUtil. Does log4j provide something? Is there another tool / concept for this?