You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Ashish Kulkarni <ku...@yahoo.com> on 2002/04/17 20:51:44 UTC

Simple XML Configuration file

Hi 
I am looking for a simple XML configuration file,
which will is equal to the following properties file,
can anyone help in converting it to XML file

log4j properties file
# define which appenders to use for our
categories/loggers;
    #  We'll use two, named STDOUT and FILE
     log4j.rootCategory=, STDOUT, FILE
     
     # Tell STDOUT appender where to send it's log
messages. By using ConsoleAppender 
     #   we tell it to output to the console, or
System.out. 
    
log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender
     
     # Tell the FILE appender where to send its
messages. By using FileAppender
     #   we tell it to output to a file. We also have
to specify the file name
     #   which we do on the following line, log4j.log.
Because we don't specify
     #   a path, it goes into the application's
current working directory.
     log4j.appender.FILE=org.apache.log4j.FileAppender
     log4j.appender.FILE.File=log4j.log
     
     
     # Define what Layouts our appenders will use
    
log4j.appender.FILE.layout=org.apache.log4j.PatternLayout
    
log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout

     # Define the conversion pattern the
PatternLayouts use; More options are 
     #    in the JavaDoc for PatternLayout.
     log4j.appender.FILE.layout.ConversionPattern=%-4r
%-5p [%t] %37c %3x - %m%n
    
log4j.appender.STDOUT.layout.ConversionPattern=%-4r
%-5p [%t] %37c %3x - %m%n


Ashish

__________________________________________________
Do You Yahoo!?
Yahoo! Tax Center - online filing with TurboTax
http://taxes.yahoo.com/

--
To unsubscribe, e-mail:   <ma...@jakarta.apache.org>
For additional commands, e-mail: <ma...@jakarta.apache.org>