diff --git a/sklearn2pmml/resources/sklearn2pmml-1.0-SNAPSHOT.jar b/sklearn2pmml/resources/sklearn2pmml-1.0-SNAPSHOT.jar index 7252881..48af295 100644 Binary files a/sklearn2pmml/resources/sklearn2pmml-1.0-SNAPSHOT.jar and b/sklearn2pmml/resources/sklearn2pmml-1.0-SNAPSHOT.jar differ diff --git a/src/main/java/com/sklearn2pmml/Main.java b/src/main/java/com/sklearn2pmml/Main.java index 1dd25f1..2f017de 100644 --- a/src/main/java/com/sklearn2pmml/Main.java +++ b/src/main/java/com/sklearn2pmml/Main.java @@ -20,9 +20,11 @@ import java.io.File; import java.io.FileOutputStream; +import java.io.IOException; import java.io.OutputStream; import java.util.Collection; import java.util.List; +import java.util.logging.LogManager; import com.beust.jcommander.JCommander; import com.beust.jcommander.Parameter; @@ -147,6 +149,16 @@ private void run() throws Exception { } } + static { + LogManager logManager = LogManager.getLogManager(); + + try { + logManager.readConfiguration(Main.class.getResourceAsStream("/logging.properties")); + } catch(IOException ioe){ + ioe.printStackTrace(System.err); + } + } + private static final Logger logger = Logger.getLogger(Main.class); static { diff --git a/src/main/resources/logging.properties b/src/main/resources/logging.properties new file mode 100644 index 0000000..00476b2 --- /dev/null +++ b/src/main/resources/logging.properties @@ -0,0 +1,7 @@ +.level=INFO + +handlers=java.util.logging.ConsoleHandler +java.util.logging.ConsoleHandler.level=INFO +java.util.logging.ConsoleHandler.formatter=java.util.logging.SimpleFormatter + +java.util.logging.SimpleFormatter.format=%4$s: %5$s%6$s%n \ No newline at end of file