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 Thilo Schottelius <Th...@impress.com> on 2001/04/23 15:35:34 UTC

Sample property file

As it was not self-explaning to write a property file, I include one which
may serve as an example:

----------------------------------
#**************************************************************************
# Root Kathegorie setzen. Appender an die Root Kathegorie haengen
# die Name der Appender (FileApp1, FileApp2 ...) sind frei waehlbar!
# Assign priority to the rootClass. Assign the appender named FileApp1
# to the root catagorie and therefore to all the childs (inheritance)
#**************************************************************************
log4j.category.impress.ois.log4jtest.RootClass=ERROR, FileApp1

#**************************************************************************
# Erster File Appender; First File Appender
#**************************************************************************
log4j.appender.FileApp1=org.apache.log4j.FileAppender
log4j.appender.FileApp1.File=System.out
log4j.appender.FileApp1.layout=org.apache.log4j.PatternLayout
log4j.appender.FileApp1.layout.ConversionPattern=%p [%t] %c (%x)- %m%n

#**************************************************************************
# Zweiter FileAppender schreibt in eine andere Datei
# Second file appender writes output to another file
#**************************************************************************
log4j.appender.FileApp2=org.apache.log4j.FileAppender
log4j.appender.FileApp2.File=C:/tmp/log4j-2.log
log4j.appender.FileApp2.layout=org.apache.log4j.PatternLayout

#**************************************************************************
# Rolling-File Appender
# do not forget to set layout
#**************************************************************************
log4j.appender.RolFileApp=org.apache.log4j.RollingFileAppender
log4j.appender.RolFileApp.File=C:/tmp/rollingFile.log
log4j.appender.RolFileApp.layout=org.apache.log4j.PatternLayout
log4j.appender.RolFileApp.MaxFileSize=1
log4j.appender.RolFileApp.MaxBackupIndex=5

#**************************************************************************
# Using the NT Event logger Appender
# do not forget to set the system PATH to the directory containing the 
# NTEventLogAppender.dll!
#**************************************************************************
log4j.appender.NTEvApp=org.apache.log4j.nt.NTEventLogAppender
log4j.appender.NTEvApp.layout=org.apache.log4j.PatternLayout

#**************************************************************************
# SMTP Appender
# attention: add the classpath to the location of the archives mail.jar, 
# activation.jar 
#**************************************************************************
log4j.appender.SMTPApp=impress.ois.log4jtest.child.ChildSMTPAppender
log4j.appender.SMTPApp.SMTPHost=10.1.1.2
log4j.appender.SMTPApp.From=J4Logger@company.com
log4j.appender.SMTPApp.To=thilo.schottelius@company.com
log4j.appender.SMTPApp.Subject=Fehler!
log4j.appender.SMTPApp.layout=org.apache.log4j.PatternLayout

#**************************************************************************
# Set the priority of all the classes inside the child package
#**************************************************************************
log4j.category.impress.ois.log4jtest.child.ChildInfo=INFO,FileApp2
log4j.category.impress.ois.log4jtest.child.ChildWarn=WARN,RolFileApp
log4j.category.impress.ois.log4jtest.child.ChildDebug=DEBUG
log4j.category.impress.ois.log4jtest.child.ChildFatal=FATAL
#**************************************************************************
# Fehlermeldung aus dem ErrorChild per SMTP zumailen und an das NT Event log
# schicken
# Send an error message via SMTP and use the NT event logger for this 
# category
#**************************************************************************
log4j.category.impress.ois.log4jtest.child.ChildError=ERROR, SMTPApp,NTEvApp


#**************************************************************************
# using an own Renderer
#**************************************************************************
log4j.renreder.impress.ois.og4jtest.child.TestRenderer=impress.ois.og4jtest.
child.GenericContainerRenderer

----------------------------------------------------------------------------
---------------------------
Dr. Thilo Schottelius
IMPRESS SOFTWARE AG
<http://www.impress.com>
<Ma...@impress.com>

            


---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: log4j-user-help@jakarta.apache.org