I'm using Play 2.4 with Activator 1.3.7, and I'm noticing System.out.println
doesn't always print in order to the console in the browser. It's pretty rare, but I caught it in action today. Here's the order of the print statements:
System.out.println("width : " + mobileCrawl.getWidth());
System.out.println("window width : " + mobileCrawl.getWindowWidth());
System.out.println("scroll width : " + mobileCrawl.getScrollWidth());
System.out.println("seed : " + mobileCrawl.getSeed());
System.out.println("resolved seed : " + mobileCrawl.getResolvedSeed());
System.out.println("crawl date : " + mobileCrawl.getCrawlDate());
System.out.println("400 : " + mobileCrawl.isDetected400());
System.out.println("401 : " + mobileCrawl.isDetected401());
System.out.println("402 : " + mobileCrawl.isDetected402());
System.out.println("403 : " + mobileCrawl.isDetected403());
System.out.println("404 : " + mobileCrawl.isDetected404());
System.out.println("500 : " + mobileCrawl.isDetected500());
System.out.println("501 : " + mobileCrawl.isDetected501());
System.out.println("502 : " + mobileCrawl.isDetected502());
System.out.println("503 : " + mobileCrawl.isDetected503());
And here is the order it printed in (URLs are changed):
width : 980
window width : 980
scroll width : 980
seed : http://google.com/
resolved seed : https://www.google.com/
400 : false
401 : false
402 : false
crawl date : Fri Dec 18 11:18:09 MST 2015
403 : false
500 : false
404 : true
501 : false
502 : false
503 : false
The date printed three lines after it should have. These are all print statements coming from the same thread, they are all from System.out
, not any from System.err
, so there shouldn't be any interleaving.
How can these print out of order? I thought System.out
guaranteed order.