Duplicate logging to file

206 views
Skip to first unread message

Jan Strube

unread,
May 31, 2018, 5:08:25 AM5/31/18
to Thorntail
Hi,

I have the following logging configuration:

swarm:
    logging:
        console-handlers:
            STDOUT:
                level: DEBUG
        periodic-rotating-file-handlers:
            FILE:
                level: DEBUG
                file:
                    path: log/app.log
                formatter: '%d %-5p [%t] %c: %m%n'
                suffix: yyyy-MM-dd
        root-logger:
            level: INFO
            handlers:
                - STDOUT
                - FILE
        loggers:
            com.company:
                level: DEBUG

The Problem is, that all com.company log entries appear twice, but only in the log file. The console output is fine.

Any ideas?


Thanks,

Jan


P.S.: I also posted this question on Stackoverflow: https://stackoverflow.com/questions/50619815/duplicate-logging-in-wildfly-swarm

Ken Finnigan

unread,
May 31, 2018, 8:30:42 AM5/31/18
to Thorntail
I'm far from an expert on the intricacies of logging configuration, but I wonder whether it's because you've essentially got two loggers for com.company, the root-logger and com.company

Have you tried removing the com.company logger setting and seeing what shows up in the file?

Ken

Jan Strube

unread,
Jun 1, 2018, 2:43:36 AM6/1/18
to Thorntail
Hi Ken,

In fact I did exactly that. But the result was the same. And that puzzled me even more...

Then I removed the logging part (which uses the same file) of the resources/project-stages.yml and it worked.
I though that it would be overwritten by the config file I provide as parameter, but apparently I was wrong and they are somehow mixed together.
Can you confirm that?

Jan

Ken Finnigan

unread,
Jun 4, 2018, 6:22:39 AM6/4/18
to Thorntail
I would've expected an override as well.

Can you raise an issue at http://issues.jboss.org/browse/THORN

Jan Strube

unread,
Jun 5, 2018, 4:03:06 AM6/5/18
to Thorntail
Reply all
Reply to author
Forward
0 new messages