uncomment the "log4j.appender" lines. ■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER (269) 923-5278 // douglas_e_wegsch...@whirlpool.com "A wrong note played hesitatingly is a wrong note. A wrong note played with conviction is interpretation."
Clement Jebakumar <jeba.r...@gmail.com> 11/20/2010 09:21 AM Please respond to "Log4J Users List" <log4j-user@logging.apache.org> To log4j-user@logging.apache.org cc Subject Logging to File Hi, How do i set all logs to a file. I am setting the property file. Do i need to change something? Bellow is my property file and code sample LogProperty.log # Set root logger level to DEBUG and its only appender to A1. log4j.rootLogger=WARN, A1 # A1 is set to be a ConsoleAppender. # log4j.appender.A1=org.apache.log4j.ConsoleAppender # A1 uses PatternLayout. # log4j.appender.A1.layout=org.apache.log4j.PatternLayout # log4j.appender.A1.layout.ConversionPattern=%-4r [%t] %-5p %c %x - %m%n log4j.logger.com.declum=WARN Code: PropertyConfigurator.configure(line.getOptionProperties("l")); Logger.getLogger(getClass()).info("Star listening on " + monitorPort); *Clement Jebakumar,* 111/27 Keelamutharamman Kovil Street, Tenkasi, 627 811 http://www.declum.com/clement.html