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

Reply via email to