-
1. Re: Exclude stdout from certain Lib
peterj Mar 9, 2010 11:54 AM (in response to borobudur)Try this:
<category name="STDOUT" additivity="false">
<priority value="WARN"/>
<appender-ref ref="CONSOLE"/>
</category>The category name is usually printed within braces, [...], in the JBoss AS log file and System.out text shows as:
2010-03-08 09:04:57,618 INFO [STDOUT] (Thread-18) Retrieving document at ...
-
2. Re: Exclude stdout from certain Lib
borobudur Mar 10, 2010 2:14 AM (in response to peterj)Better would be just to exclude this library but it's already a solution. Thanks!
Can I ask you an othere thing I'm trying to do but can't really find a good solution?
I would like to develop in debug mode but if I change to debug all the jboss debug output is shown too and the server is this slow that it doesn't really run anymore. How can I set the global to info mode and my application to debug? Thanks again!
-
3. Re: Exclude stdout from certain Lib
jaikiran Mar 10, 2010 2:23 AM (in response to borobudur)You want your application's DEBUG level logs to appear on the CONSOLE? Or do you want them to be available in a log file? -
4. Re: Exclude stdout from certain Lib
borobudur Mar 10, 2010 2:25 AM (in response to jaikiran)Console -
5. Re: Exclude stdout from certain Lib
jaikiran Mar 10, 2010 2:37 AM (in response to borobudur)Try this:
<!-- Set the threshold of CONSOLE appender to DEBUG --> <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> ... <param name="Threshold" value="DEBUG"/> ... </appender> <!-- Set the log level of your app's loggers to DEBUG --> <category name="org.myapp"> <priority value="DEBUG"/> </category> <!-- And set the log level of the root logger to INFO --> <root> <priority value="INFO"/> <appender-ref ref="CONSOLE"/> <appender-ref ref="FILE"/> </root>
-
6. Re: Exclude stdout from certain Lib
borobudur Mar 10, 2010 7:05 AM (in response to jaikiran)That works, thanks! -
7. Re: Exclude stdout from certain Lib
borobudur Mar 15, 2010 7:33 AM (in response to borobudur)I didn't find the concept of jboss/log4j threshold/appender to easy to understand. I made a little drawing. Perhaps it helps someone else.