Logback / Weblogic How to set different log level? -


i using weblogic 10.3.6 , not able control different log level 2 different appenders (com.my & root) given logback.xml expecting trace level file appender , nothing under weblogic terminal. issue same output on both.

<?xml version="1.0" encoding="utf-8"?>  <!-- assistance related logback-translator or configuration  --> <!-- files in general, please contact logback user mailing list --> <!-- @ http://www.qos.ch/mailman/listinfo/logback-user             --> <!--                                                                --> <!-- professional support please see                            --> <!--    http://www.qos.ch/shop/products/professionalsupport         --> <!--                                                                --> <configuration>     <contextname>mycontx</contextname>     <jmxconfigurator />     <appender name="file" class="ch.qos.logback.core.rolling.rollingfileappender">         <!--see http://logback.qos.ch/manual/appenders.html#rollingfileappender-->         <file>/var/log/a.log</file>         <encoder>             <pattern>%d{hh:mm:ss.sss} %5p %c{1}:%l - %m%n</pattern>         </encoder>         <rollingpolicy class="ch.qos.logback.core.rolling.fixedwindowrollingpolicy">             <maxindex>1</maxindex>             <filenamepattern>/var/log/a.log.%i</filenamepattern>         </rollingpolicy>         <triggeringpolicy class="ch.qos.logback.core.rolling.sizebasedtriggeringpolicy">             <maxfilesize>1mb</maxfilesize>         </triggeringpolicy>     </appender>     <appender name="out"               class="ch.qos.logback.core.consoleappender">         <layout class="ch.qos.logback.classic.patternlayout">             <pattern>%-4relative [%thread] %-5level %class - %msg%n</pattern>         </layout>     </appender>       <logger name="com.my" level="trace">         <appender-ref ref="file" />     </logger>     <root level="off">         <appender-ref ref="out" />     </root> </configuration> 

i setting additivity flag you:

<logger name="com.my" level="trace" additivity="false">     <appender-ref ref="file" /> </logger> 

see http://logback.qos.ch/manual/configuration.html#overrridingcumulativity.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -