Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Where to see output from PlayN.Log

Tags:

logging

playn

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.

like image 527
user1069703 Avatar asked Jan 27 '12 15:01

user1069703


1 Answers

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/

like image 138
samskivert Avatar answered Nov 15 '22 20:11

samskivert