logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Clement Jebakumar <jeba.r...@gmail.com>
Subject Logging to File
Date Sat, 20 Nov 2010 14:21:50 GMT
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

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message