I am using PlayN for a small project, and it would be nice to be able to output some debug code during runtime in different browsers. PlayN provides a function called log, where I can choose different levels of output, but none of them seems to print something out in my IE, FF or Chrome.
Am I doing something wrong ? I am just using PlayN.log().debug("TEST") and I have also tried the other logging levels, but nothing appears in any of the browser consoles.
Currently you have to configure a special logging service which requires adding a dependency to your HTML project and a configuration to your Game.gwt.xml file. Add this to yourgame/html/pom.xml
:
<dependencies>
...
<dependency>
<groupId>com.allen-sauer.gwt.log</groupId>
<artifactId>gwt-log</artifactId>
<version>3.1.6</version>
</dependency>
</dependencies>
Then add this to yourgame/src/main/java/yourgame/YourGame.gwt.xml
:
<inherits name="playn.logging.Enhanced" />
This will enable a pretty heavy weight logging system. You can read more about that logging system on it's project page: http://code.google.com/p/gwt-log/
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With