[2.0] Logging problem in prod mode

299 views
Skip to first unread message

ArnaudT

unread,
Apr 23, 2012, 11:05:47 AM4/23/12
to play-fr...@googlegroups.com
Hi Guys,


I have some difficulties to configure the log in production
I followed this page: https://github.com/playframework/Play20/wiki/ProductionConfiguration

I use the play dist command to generate the distrib package

Then I use this command to start the server
./start -Dlogger.file=/var/www/logger.xml -Dconfig.file=/var/www/prod.conf -Dhttp.port=9001
The configuration and port is well loaded, not the logger config.

I use the latest Play 2.1-SNAPSHOT

Furthermore,
I have different behavior between my mac and a debian machine. The classpath is not loaded in the same way
If I use a logback.xml in /conf instead of a logger.xml. The logger config is well loaded on my mac but not in a debian machine.

On a mac
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/Users/arnaud/dist/streamhub-analytics-1.0-SNAPSHOT/lib/ch.qos.logback.logback-classic-1.0.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/arnaud/dist/streamhub-analytics-1.0-SNAPSHOT/lib/org.slf4j.slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/Users/arnaud/dist/streamhub-analytics-1.0-SNAPSHOT/lib/org.slf4j.slf4j-simple-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

On a debian box (Linux sh-arnaud 2.6.32-5-amd64 #1 SMP Thu Mar 22 17:26:33 UTC 2012 x86_64 GNU/Linux)
SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/var/www/streamhub-analytics-1.0-SNAPSHOT/lib/org.slf4j.slf4j-log4j12-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/var/www/streamhub-analytics-1.0-SNAPSHOT/lib/org.slf4j.slf4j-simple-1.6.4.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/var/www/streamhub-analytics-1.0-SNAPSHOT/lib/ch.qos.logback.logback-classic-1.0.0.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: See http://www.slf4j.org/codes.html#multiple_bindings for an explanation.

Have you ever had some logging issue? What command do you use?
What should I do to make the logging works on my production environment?

Thanks a lot for your help!
Arnaud.

Justin

unread,
Jul 13, 2012, 8:19:58 AM7/13/12
to play-fr...@googlegroups.com
I have encountered the same problem.

Nobody resolved this?

2012년 4월 24일 화요일 오전 12시 5분 47초 UTC+9, ArnaudT 님의 말:

peter hausel

unread,
Oct 10, 2012, 10:50:45 AM10/10/12
to play-fr...@googlegroups.com
This was fixed as of 2.0.3  (https://play.lighthouseapp.com/projects/82401/tickets/448-play-dist-ignores-loggerxml#ticket-448-12 ) Perhaps the wiki page needs to be updated, but anyway I believe you should use application-logger.xml instead to avoid the name clash with the bundled logger.xml. 

Hope this helps.

Thanks,
Peter

Brian Smith

unread,
Oct 10, 2012, 1:34:21 PM10/10/12
to play-fr...@googlegroups.com
Note that the present of reference.conf on the classpath can make it look like that ticket isn't fixed.


Let me know if I should raise a bug.

Thanks

Brian

--
You received this message because you are subscribed to the Google Groups "play-framework" group.
To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/LQMuPuNVVfAJ.

To post to this group, send email to play-fr...@googlegroups.com.
To unsubscribe from this group, send email to play-framewor...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/play-framework?hl=en.

SS

unread,
Oct 17, 2012, 7:40:42 AM10/17/12
to play-fr...@googlegroups.com
How did you end up removing the extra jar from your classpath?

I see a warning as well when I start my server. I'm not really sure where that dependency is coming from.

SLF4J: Class path contains multiple SLF4J bindings.
SLF4J: Found binding in [jar:file:/data1/home/ss/src/Play20/repository/cache/ch.qos.logback/logback-classic/jars/logback-classic-1.0.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
SLF4J: Found binding in [jar:file:/data1/home/ss/src/Play20/repository/cache/org.slf4j/slf4j-log4j12/jars/slf4j-log4j12-1.6.3.jar!/org/slf4j/impl/StaticLoggerBinder.class]
On Wednesday, October 17, 2012 2:18:17 AM UTC+5:30, Manas Gupta wrote:
I ran into some problems with respect to custom logger.xml on Ubuntu.

Details + Solution here (all the way at the bottom) - 
https://play.lighthouseapp.com/projects/82401/tickets/448-play-dist-ignores-loggerxml#ticket-448-28

On Tuesday, October 9, 2012 4:51:05 PM UTC-4, Manas Gupta wrote:
Same problem.

logging.xml is picked up when running -> java -jar /home/play/play-2.0.2/framework/sbt/sbt-launch.jar start or run.

But nothing when creating a dist.

On Sunday, October 7, 2012 8:12:06 PM UTC-4, Steven Bourke wrote:
Same for me. Anyone found a solution?
Reply all
Reply to author
Forward
0 new messages