Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Play Framework 2.2 log output to console in tests

How do I configure the logger in Play Framework 2.2 in order that I see log output in the console during play integration tests?

The configuration for Play Framework 2.1 does not work anymore.

BR Rene

like image 830
reen Avatar asked Sep 25 '13 07:09

reen


1 Answers

I have not done this yet, but you have to configure a logback configuration file. See the play documentation for additional information: http://www.playframework.com/documentation/2.2.x/SettingsLogger

Once you defined a specific logback configuration file, this needs to be placed in the test package, see this issue for details:https://github.com/playframework/playframework/issues/1669#issuecomment-24452132

See message from @benmccann: you can configure the logger in test mode by placing a logback-test.xml in test/resources (took me hours to figure out!).

like image 55
adis Avatar answered Oct 22 '22 15:10

adis