From 6ca778a80bdb41439632ce8fa2c959b3da4052fc Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Thu, 4 Oct 2018 14:17:18 +1300 Subject: Filter JRE internal logging (#4083) --- src/org/traccar/helper/Log.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'src') diff --git a/src/org/traccar/helper/Log.java b/src/org/traccar/helper/Log.java index 9bc86b137..7a1faf8bb 100644 --- a/src/org/traccar/helper/Log.java +++ b/src/org/traccar/helper/Log.java @@ -169,11 +169,9 @@ public final class Log { Level level = Level.parse(config.getString("logger.level").toUpperCase()); rootLogger.setLevel(level); handler.setLevel(level); + handler.setFilter(record -> record != null && !record.getLoggerName().startsWith("sun")); rootLogger.addHandler(handler); - - Logger.getLogger("sun").setLevel(Level.OFF); - Logger.getLogger("java").setLevel(Level.OFF); } public static String exceptionStack(Throwable exception) { -- cgit v1.2.3