Here a example how to configure filters. Note: Filters are only available if
you use xml configuration.
appender name=CONSOLE.OUT class=org.apache.log4j.ConsoleAppender
param name=target value=System.out/
layout class=org.apache.log4j.PatternLayout
param
Thanks Heri for ur help..
one thing more i want to ask is is this configuration will be done in
Log4j.properties..if not then where i have to write all this.And is
TraceDenyFilter and XMLDenyFilter are self made filters or do i have two
build two classes extending these filters. In case so where
If you want to work with filters you must use log4j.xml configuration instead
of log4j.properties. The properties configuration style does not support filter
entries. It's anyway recommended to use xml configuration since:
- the auto configuration mechanisme of log4j looks first for the
Heri one more thing can we place log4j.xml in root directory of project as my
project is not a Web project so i wont be having web-inf in that!!!
garima015 wrote:
Thanks Heri..thanks for ur help!!!
I hope log4j.xml will also be read in the same manner as
log4j.properties..
Bender Heri
For auto configuration log4j.xml must be found in the classpath. Else you can
do it within code by calling DOMConfigurator.configure(
myFullOrRelativeFileName ).
Heri
-Original Message-
From: garima015 [mailto:[EMAIL PROTECTED]
Sent: Thursday, November 30, 2006 4:05 PM
To:
Thanks Heri i am able to read the xml file now.
Thanks for ur time.
Bender Heri wrote:
For auto configuration log4j.xml must be found in the classpath. Else you
can do it within code by calling DOMConfigurator.configure(
myFullOrRelativeFileName ).
Heri
-Original Message-