You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Henrique Seganfredo <he...@neogrid.com.br> on 2001/05/16 19:35:44 UTC
xml configs (URGENT)
Hi folks,
here is my dummy config file
<appender name="A0" class="org.apache.log4j.FileAppender">
<param name="Append" value="true" />
<param name="File" value="System.out" />
<param name="ImmediateFlush" value="true" />
<layout class="org.apache.log4j.PatternLayout">
<param name="ConversionPattern" value="[%p %d %t %c - %m]\n"/>
</layout>
</appender>
<root>
<priority value="debug" />
<appender-ref ref="A0" />
</root>
I just want to clear out some ideas:
1) If I add this extra line
<category name="com.test">
<priority value="debug" />
<appender-ref ref="A0" />
</category>
and this statement in my code: cat = getInstance("com.test")
I will see the output twice right? the first lines due the <root> and the
duplicated lines due the category name, right?
2) How do I strict to see only "debug" or "info" messages ? please give an
example...I could not figure out because the XML tag <priority> always seem
to let all the priorities with higher position in the hierarchy to appear
also...
3) If I consider I am working with the default priorities only, I found
running some tests that the hierarchy is DEBUG < INFO < WARN < ERROR <
FATAL, is this true? This is strange because those some priorities like
DEBUG and INFO does not seem to me to have any relationship...anyway, please
somebody clarify this..
Thanks a lot!