logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Kitching Simon <Simon.Kitch...@orange.ch>
Subject RE: Filter problem
Date Tue, 20 Feb 2001 10:40:25 GMT


> -----Original Message-----
> From:	Venugopal Siripuram [SMTP:svenu@wilco-int.com]
> Sent:	Tuesday, February 20, 2001 11:17 AM
> To:	'log4j-dev@jakarta.apache.org'
> Subject:	Filter problem
> 
> Hi..
> I want a log messages whose prority exactly matches a particular proirty
> should to written into a particular Appender
> for examples:
>  i want to write all error message to appender A1,
>               all warn message to appender A2 etc..
> I want this to configure in configaration file i.e., in a normal text
> file(Not Xml file)
> 
> i tried out the following,but it is not working
> 
> log4j.appender.A2=org.apache.log4j.FileAppender
> log4j.appender.A2.File=example1.log
> log4j.appender.A2.layout=org.apache.log4j.PatternLayout
> 
> log4j.appender.A2.layout.ConversionPattern=%d{dd/MMM  HH:mm:ss}  %-5p:
> %-25C{3}[%-M]%3x      %-m%n
> log4j.appender.A2.Filter=org.apache.log4j.varia.PriorityMatchFilter
> log4j.appender.A2.Filter.PriorityToMatch="WARN"
> log4j.appender.A2.Filter.AcceptOnMatch=true
> 
> please any one write a correct solution for this....
	[Kitching Simon]  
	To quote from the PropertyConfigurator documentation:

	The PropertyConfigurator does not handle the advanced
	configuration features supported by the DOMConfigurator
	such as support for .... Filters....

	As far as I know, this situation has not changed since
	the last release. You could either use DOMConfigurator
	(ie xml-based config files) or add Filter support to the
	PropertyConfigurator...(shouldn't be too hard).

	Regards,

	Simon


> Regards
> Venugopal Siripuram
> **************************************************************************
> **
> *********************************
> 
> 
> 
> 
> --------------------------------------------------------------------------
> --------------------------------------------------
> The information transmitted is intended only for the person or entity to
> which it is addressed and may contain confidential 
> and/or privileged material. Any review, retransmission, dissemination or
> other use of, or taking of any action in reliance upon,
> this information by persons or entities other than the intended recipient
> is prohibited. If you received this in error, please 
> contact the sender and delete the material from any computer.
> --------------------------------------------------------------------------
> --------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: log4j-dev-help@jakarta.apache.org

Mime
View raw message