[2.0.3] Custom logging bug

68 views
Skip to first unread message

Brian Smith

unread,
Sep 28, 2012, 8:12:40 PM9/28/12
to play-fr...@googlegroups.com
Hi

I've been having some problems using custom logback configuration with 2.0.3 where no matter what I did in by application-logger.xml, nothing would be logged.  I think I've found a bug. 

After configuring logback, play seems to override the level of some of the loggers.  I believe this happens because reference.conf is on the classpath, being present in play_2.9.1-2.0.3.jar, and is caused by play.api.Logger:257-259

        levels.foreach {
          case (logger, level) => ctx.getLogger(logger).setLevel(level)
        }

It looks to me like that should only be done if no specific logback config is found.  At the moment, the root logger is being reset to ERROR which was why I was getting no output.

regards

Brian




James Roper

unread,
Sep 29, 2012, 2:15:59 AM9/29/12
to play-fr...@googlegroups.com
Agreed, we should remove the logging configuration from reference.conf, it's not necessary anyway, since Play already defines it's own logger.xml.

But the overriding from reference/application.conf should happen because we shouldn't ignore config in application.conf.
Reply all
Reply to author
Forward
0 new messages