Double logging in console

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Double logging in console

sadiq81
Hey

I have been trying like crazy to figure out what is going. All my console logs are coming out twice.

Perhaps someone can tell me what idiot mistake i have made.

<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="true">


    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</Pattern>
        </encoder>
    </appender>

    <logger name="dk.eazyit.eazyregnskab" level="DEBUG">
        <appender-ref ref="STDOUT"></appender-ref>
    </logger>

    <root level="WARN">
        <appender-ref ref="STDOUT"/>
    </root>

</configuration>

Reply | Threaded
Open this post in threaded view
|

Re: Double logging in console

Robert Kuhar
I don't know if its the source of your duplication, but you don't need to be specifying the STDOUT appender in the logger name="dk.eazyit.eazyregnskab".  My configs typically have root level="INFO" but to get a specific logger to put its DEBUG messages there i just specify the logger I want to, what is it, elevate it level

<logger name="htc.cs.service.device.webapp.TracerIDFilter" level="debug" />

<root level="info">
  <appender-ref ref="STDOUT" />
  <appender-ref ref="DAILY_ROLLING" />
  <appender-ref ref="SYSLOG" />
</root>

This makes all loggers log at INFO to my 3 x appenders, but the TracerIDFilter thing logs to those appenders at DEBUG


On Thu, Jul 11, 2013 at 11:39 AM, sadiq81 <[hidden email]> wrote:
Hey

I have been trying like crazy to figure out what is going. All my console
logs are coming out twice.

Perhaps someone can tell me what idiot mistake i have made.

<?xml version="1.0" encoding="UTF-8"?>
<configuration debug="true">


    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <encoder>
            <Pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} -
%msg%n</Pattern>
        </encoder>
    </appender>

    <logger name="dk.eazyit.eazyregnskab" level="DEBUG">
        <appender-ref ref="STDOUT"></appender-ref>
    </logger>

    <root level="WARN">
        <appender-ref ref="STDOUT"/>
    </root>

</configuration>





--
View this message in context: http://logback.10977.n7.nabble.com/Double-logging-in-console-tp12662.html
Sent from the Users mailing list archive at Nabble.com.
_______________________________________________
Logback-user mailing list
[hidden email]
http://mailman.qos.ch/mailman/listinfo/logback-user


_______________________________________________
Logback-user mailing list
[hidden email]
http://mailman.qos.ch/mailman/listinfo/logback-user
Reply | Threaded
Open this post in threaded view
|

Re: Double logging in console

sadiq81
That did the trick.

Thank you so much.