Hi
  
  I have the following code:
  
  private static  void configurator(String loggingFilePath, String 
maximumFileSize,  String datePattern, String patternlayout, boolean 
append,Level logLevel)
      {
          try {
  
              //Create the layout. TM
              PatternLayout ptnlayout = new PatternLayout(patternlayout);
              
              //Create the appemder and configure it. TM
               CompositeRollingAppender comp = new  
CompositeRollingAppender(ptnlayout,loggingFilePath);
              comp.setFile(loggingFilePath);
              comp.setStaticLogFileName(true);//still to test
              comp.setDatePattern(datePattern);
              comp.setAppend(append);  
              comp.setMaxFileSize(maximumFileSize);
              comp.setRollingStyle(3);
              comp.setMaxSizeRollBackups(3);
              comp.activateOptions();
      
              //Associate the logger
              logger.removeAllAppenders();
              logger.addAppender(comp);
              logger.setLevel(logLevel);
           }
           catch(Exception e)  {            
              e.printStackTrace();
               System.out.println("\nError inside CSBaseServlet while creating 
log  file " + e.getMessage());
           }
      }
  
  It works just fine except I only want it to log the statements in the given 
output file and NOT also in the Tomcat log file.
  
  Please advise

       
---------------------------------
Moody friends. Drama queens. Your life? Nope! - their life, your story.
 Play Sims Stories at Yahoo! Games. 
  • Log4j Tshegofatso Manakana

Reply via email to