Преглед изворни кода

[Nifty-GUI] Using java logger, instead of stdout

Replaced call to System.out.println() with proper logging call.
Christian Gärtner пре 10 година
родитељ
комит
97a2f58be7
1 измењених фајлова са 5 додато и 1 уклоњено
  1. 5 1
      jme3-niftygui/src/main/java/com/jme3/cinematic/events/GuiEvent.java

+ 5 - 1
jme3-niftygui/src/main/java/com/jme3/cinematic/events/GuiEvent.java

@@ -38,6 +38,8 @@ import com.jme3.export.JmeImporter;
 import com.jme3.export.OutputCapsule;
 import de.lessvoid.nifty.Nifty;
 import java.io.IOException;
+import java.util.logging.Level;
+import java.util.logging.Logger;
 
 /**
  *
@@ -45,6 +47,8 @@ import java.io.IOException;
  */
 public class GuiEvent extends AbstractCinematicEvent {
 
+    static final Logger log = Logger.getLogger(GuiEvent.class.getName());
+
     protected String screen;
     protected Nifty nifty;
 
@@ -76,7 +80,7 @@ public class GuiEvent extends AbstractCinematicEvent {
 
     @Override
     public void onPlay() {
-        System.out.println("screen should be " + screen);
+        log.log(Level.FINEST, "screen should be {0}", screen);
         nifty.gotoScreen(screen);
     }