Set a threshold on info appender and send root logs to both appenders.
On 12/2/06, chuanjiang lo <[EMAIL PROTECTED]> wrote:
Hi all, I would like to know how i can set up my log4j.xml, for e.g info level would be printed onto the console where debug level would be log into a file. These are the snippets of my log4j.xml <appender name="info-appender" class="org.apache.log4j.ConsoleAppender"> <layout class="org.apache.log4j.PatternLayout"> <param name="ConversionPattern" value="%d{dd MMM yyyy HH:mm:ss} [%t] %-5p %c - %m%n"/> </layout> </appender> <appender name="debug-appender" class="org.apache.log4j.FileAppender"> <param name="file" value="debug.log"/> <layout class="org.apache.log4j.SimpleLayout"/> </appender> <root> <priority value="debug"/> <appender-ref ref="debug-appender"/> </root> I'm not very sure how i can set up the environment, probably need some advice from experienced users. Appreciate any help
-- James Stauffer http://www.geocities.com/stauffer_james/ Are you good? Take the test at http://www.livingwaters.com/good/ --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]