Disable logging option

This commit is contained in:
Endolf 2018-05-24 22:41:39 +01:00
parent 771499a7ca
commit 5eb89d4e12
2 changed files with 7 additions and 0 deletions

View file

@ -43,6 +43,7 @@ import java.security.AccessController;
import java.security.PrivilegedAction;
import java.util.ArrayList;
import java.util.Iterator;
import java.util.logging.Level;
import java.util.logging.Logger;
/**
@ -90,6 +91,11 @@ public abstract class ControllerEnvironment {
* Protected constructor for subclassing.
*/
protected ControllerEnvironment() {
if(System.getProperty("jinput.loglevel") != null) {
String loggerName = ControllerEnvironment.class.getPackage().getName();
Level level = Level.parse(System.getProperty("jinput.loglevel"));
Logger.getLogger(loggerName).setLevel(level);
}
}
/**

View file

@ -109,6 +109,7 @@
<argument>-classpath</argument>
<classpath/>
<argument>-Djava.library.path=${project.build.directory}/natives</argument>
<argument>-Djinput.loglevel=OFF</argument>
<argument>net.java.games.input.example.ReadAllEvents</argument>
</arguments>
</configuration>