aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-10-04 14:17:18 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2018-10-04 14:17:18 +1300
commit6ca778a80bdb41439632ce8fa2c959b3da4052fc (patch)
tree79d7c831e2c371198245ca2ad752c5af1bff0b69
parent601ac968c95378ee9e9ce1fbbe8162f312c70e57 (diff)
downloadtrackermap-server-6ca778a80bdb41439632ce8fa2c959b3da4052fc.tar.gz
trackermap-server-6ca778a80bdb41439632ce8fa2c959b3da4052fc.tar.bz2
trackermap-server-6ca778a80bdb41439632ce8fa2c959b3da4052fc.zip
Filter JRE internal logging (#4083)
-rw-r--r--src/org/traccar/helper/Log.java4
1 files changed, 1 insertions, 3 deletions
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) {