From 4ca21ff067ac720cd156203d20591b3547f567c5 Mon Sep 17 00:00:00 2001 From: Villu Ruusmann Date: Mon, 28 Oct 2024 22:56:56 +0200 Subject: [PATCH] Added logging configuration --- .../resources/sklearn2pmml-1.0-SNAPSHOT.jar | Bin 6563 -> 7138 bytes src/main/java/com/sklearn2pmml/Main.java | 12 ++++++++++++ src/main/resources/logging.properties | 7 +++++++ 3 files changed, 19 insertions(+) create mode 100644 src/main/resources/logging.properties diff --git a/sklearn2pmml/resources/sklearn2pmml-1.0-SNAPSHOT.jar b/sklearn2pmml/resources/sklearn2pmml-1.0-SNAPSHOT.jar index 7252881f5d5223003e5f6829604d711f94ab71eb..48af295b82c9ab6f9f20d9cd3632c8c9570b55e3 100644 GIT binary patch delta 4095 zcmV9^GvYU}@c{~Ck$H^54gdh;9+Ue4C4UsxegFMetDW7^AV8eUDGtL5BrWEM zodsiqEE{1-5G3xzFj@`LpuM~Ymyh_0kHoc|G)W!m9IZ)}G;UqvL5-#n(j$#qTm8M6S?x-!fPB^W>AiXH{qOg`-hShqSHA*ay*#C3FD`~qjjyO- zM1KvJG<;R(d{M{O@S8eb!`IbtSuKA{!T+{8{T&_O!0+mK9lxjJ_wh{)f1qO;{!qso z_@f&9G5$oyxA3QGcvB63riMQc;V|575}ErepG`WMzg@D_fg;eTqd0spJvZ8g6W#Ar|u6d@t;X;P)*7F^WCACzjf6$pwJ zlpqz5kS4m0R;kg&kSV&Z7U)hT`wbY@diW+2g&u`^b} zPFYP3OF@mh?X7}Y>z;z0wR)@Q9e*Ow(}nz)WK#&5OeUJ#J%M)2%H}ACV0L>t+ZXLk z_C*yybdS5gv4oO~_ghJm^qa;$L-BNq1Sq6ng@b?8K_1&Kl4&V!kX|5>?(0(+iyg&t zg;dne<<0m&R2|r7R3P1R z)QaboY9;17oIMiLa`|-D?0=(@^UAEAIhpTIrzoOxMzA`wCznnX^45+r4+yzef4fb= zLspToQldmDNjobuWd{nGG1-(KTB&^YBa(v+~OwRMHa4GOJ9v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Qn5w10t5l@+a5E9`JAF%Q-y5GqJswN79* zXyv|Y$_sj|TdN&QS7Fo^qOk^$`!k*W4Ej|!T>!scX$#t&i=7vIvu_+bKaVTNu}j+l zaT2=Gxm!O>j3;QzCrNeGX%#+=w>Zs$2b=H%yxAYbb9h!75&RiYO9KQH000OG0N^22 zS+j%@1PKbCF;rAr4FCY+8<7&DV#8!ZA97L$(~ TMGgu83IOB+005~L00000{E+6Y 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