Well, we do performance testing to find out which steps of our application take how long. Of course, it’s easy to parse / filter regular expression logs - this is a charm. To the problem: our jsf application is divided into several projects that are used by other (not jsf) applications. My first approach would be:
if(logger.isDebugEnabled())
logger.debug("Service call took: " + (System.currentTimeMillis() - time)+ " JSESSIONID="+CookieUtil.getJsessionId(FacesContext.getCurrentInstance())) ;
(CookieUtil will read sessionId from HttpServletRequest)
But ... it is obvious that other projects do not like dependencies on JSF libraries, as well as on my neat CookieUtil. Does log4j provide something? Is there any other tool / concept for this?
source
share