[2.0.x] Enabling logging in test mode for low-level Akka debugging

578 views
Skip to first unread message

Manuel Bernhardt

unread,
Oct 25, 2012, 8:33:13 AM10/25/12
to play-fr...@googlegroups.com
Hi,

well, the subject says it all. I'd like to see exactly what's going on
with the messages that are flying around for a specific test case, but
Play eats all logging in test mode. Is there perhaps a way around it?

Manuel

peter hausel

unread,
Oct 25, 2012, 10:18:18 AM10/25/12
to play-fr...@googlegroups.com
logging in test mode is disabled now because we ran into permgen issues (partly caused by logback).

We will re-enable it for 2.1 once https://github.com/harrah/xsbt/issues/565 is released and we can turn back on "fork in Test := true". That should address this problem.

HTH,
Peter

Manuel Bernhardt

unread,
Oct 25, 2012, 3:36:45 PM10/25/12
to play-fr...@googlegroups.com
Hi,

thanks Peter, I know about the permgen issue. Nonetheless in some
cases it would be extremely convenient to see the logs in test mode.
Debugging through Akka internals when there's many actors involved is
not very fun, I'd very much prefer giving the JVM 4 GB of permgen just
to see the logs. Could this behavior not be made an configuration
option, regardless of the permgen issue being resolved or not (it
could even print a big warning on test start)?

Thanks,

Manuel
> --
> 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/-/BJqs0mrxqTMJ.
> 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.

Manuel Bernhardt

unread,
Oct 26, 2012, 4:55:28 AM10/26/12
to play-fr...@googlegroups.com
Actually just a pointer to where the logging get disabled in 2.x would
already help me a lot. I can't seem to figure out where the logs are
turned off in test mode.

Thanks,

Manuel

Manuel Bernhardt

unread,
Oct 26, 2012, 5:12:18 AM10/26/12
to play-fr...@googlegroups.com
Nevermind, I just found it.

Manuel Bernhardt

unread,
Oct 26, 2012, 5:25:46 AM10/26/12
to play-fr...@googlegroups.com
Hooray, there's a workaround: just starting Play by specifying a
logger (-Dlogger.resource=test-logger.xml) seems to do the trick.

Manuel

On Fri, Oct 26, 2012 at 11:12 AM, Manuel Bernhardt

Kövi András

unread,
Nov 11, 2012, 11:30:52 AM11/11/12
to play-fr...@googlegroups.com
What format is the test-logger.xml in? Log4j? I don't know what logging system is running under play but this workaround is essential for me.

Honestly, I wouldn't care either if I got perm gen after some testing, but the logs are vital. Actually, having some feedback about which assertion failed (stacktrace) would be great too. I miss the JUnit report XML as well. I suspect the latter one does not require logging to be enabled.

Let's hope SBT will be fixed soon.

Thanks,
Andras 

Manuel Bernhardt

unread,
Nov 12, 2012, 1:54:40 AM11/12/12
to play-fr...@googlegroups.com
test-logger.xml is a logback logger. See the documentation here:


Manuel

-- 
Manuel Bernhardt

To view this discussion on the web visit https://groups.google.com/d/msg/play-framework/-/1QofqlBGBX8J.
Reply all
Reply to author
Forward
0 new messages