1. import org.apache.log4j.Logger;
  2. import org.apache.log4j.PropertyConfigurator;
  3.  
  4. ...
  5. static Logger logger = Logger.getLogger(FuzzyQueryTest.class.getName());
  6.     public void init()
  7.     {
  8.         PropertyConfigurator.configure ("webapps/ROOT/WEB-INF/log4j.properties");
  9.      }
  10.  ...
  11.  
  12.  logger.info("SEARCH "+request.getParameter("searchWord"));

Also see:

Subscribe in reader