However... if you must... and you really want to.. Then create 2 file appenders, and set the _Appenders_ to have a Filter that only accepts the Level you are interested in (you might need to write a simple filter class for this), Debug or Info (for which ever file you wanted), then set your loggers to the lowest threshold you want to capture (debug) and attach BOTH appenders to all the loggers. This way a logger emits a DEBUG log event, which goes to both appenders, but each appender decides whether to append it to the file, because of the Filter.
cheers, Paul On 17/01/2007, at 1:13 PM, Lisa wrote:
James Stauffer <stauffer.james <at> gmail.com> writes:1. <category> -> <logger> 2. Remove class attribute from category/logger. 3. Define a <root> node at the bottom.Thanks! but I still have a few problems. #3 <root> node was not required. The appender stayed the same. the category (changed to logger) now looks like this:(note priority is no longer an acceptable tag - changed to level) <!-- myfaces-impl --> <logger name="org.apache.myfaces" additivity="false"> <level value="debug"/> <appender-ref ref="JSF.INFO.LOG"/> </logger>But now I want a debug log file with debug messages and above and an info filewith info and above on the same package. It appears to me that thename="<package>" is the limiting param but also functions as an id for the<logger> tag so log4j is complaining. <!-- presence-tech (debug) --> <logger name="com.presence" additivity="false"> <level value="debug"/> <appender-ref ref="PT.DEBUG.LOG"/> </logger> <!-- presence-tech (info) --> <logger name="com.presence" additivity="false"> <level value="info"/> <appender-ref ref="PT.INFO.LOG"/> </logger> How do I create two loggers that limit to com.presence (one logger for debug and one for info)? Log4J startup gives the following error message:log4j:WARN Attribute value "com.presence" of type ID must be unique withinthe document.So how do you have two loggers that limit to the same package but differentlevels (debug,info)? Thanks Lisa --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Paul Smith Engineering Manager Aconex The easy way to save time and money on your project 696 Bourke Street, Melbourne, VIC 3000, Australia Tel: +61 3 9240 0200 Fax: +61 3 9240 0299 Email: [EMAIL PROTECTED] www.aconex.comThis email and any attachments are intended solely for the addressee. The contents may be privileged, confidential and/or subject to copyright or other applicable law. No confidentiality or privilege is lost by an erroneous transmission. If you have received this e-mail in error, please let us know by reply e-mail and delete or destroy this mail and all copies. If you are not the intended recipient of this message you must not disseminate, copy or take any action in reliance on it. The sender takes no responsibility for the effect of this message upon the recipient's computer system.
smime.p7s
Description: S/MIME cryptographic signature
