logging-log4j-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Douglas E Wegscheid <Douglas_E_Wegsch...@whirlpool.com>
Subject Re: Logging to File
Date Mon, 22 Nov 2010 12:39:04 GMT
uncomment the "log4j.appender" lines.
■ DOUGLAS E. WEGSCHEID // LEAD ENGINEER
(269) 923-5278 // Douglas_E_Wegscheid@whirlpool.com
"A wrong note played hesitatingly is a wrong note. A wrong note played 
with conviction is interpretation."



Clement Jebakumar <jeba.ride@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


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