diff --git a/coreAPI/src/main/java/net/java/games/input/ControllerEnvironment.java b/coreAPI/src/main/java/net/java/games/input/ControllerEnvironment.java index 510436e..795c9f1 100644 --- a/coreAPI/src/main/java/net/java/games/input/ControllerEnvironment.java +++ b/coreAPI/src/main/java/net/java/games/input/ControllerEnvironment.java @@ -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); + } } /** diff --git a/examples/pom.xml b/examples/pom.xml index 3ce0cef..0589f16 100644 --- a/examples/pom.xml +++ b/examples/pom.xml @@ -109,6 +109,7 @@ -classpath -Djava.library.path=${project.build.directory}/natives + -Djinput.loglevel=OFF net.java.games.input.example.ReadAllEvents