If you name your loggers by class name, then sure. This is standard logging
configuration, not some extra special workaround.
<logger name="com.mypackage.Myclass">
<level value="debug"/>
<!-- inherits A1 appender from root, applies only to com.mypackage.MyClass
-->
</logger>
<logger name="com.myotherpackage">
<level value="debug"/>
<!-- inherits A1 appender from root, applies to all classes in
"com.myotherpackage" -->
</logger>
<root>
<level value="error"/>
<appender-ref ref="A1"/>
</root>
Jake
On Thu, 7 Jun 2012 01:51:07 -0700 (PDT)
aggarwal <akansha.agg.9@gmail.com> wrote:
>
> Hi,
>
> Is it possible to set logging level for few selected classes in appender to
> DEBUG and rest all ERROR ? Is there any combination of filter that can do
> this ?
> --
> View this message in context:
>http://old.nabble.com/class-specific-logging-level-tp33974515p33974515.html
> Sent from the Log4j - Users mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
|