From 669bdccecff50eaca46c815598df092ad0fe143d Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Mon, 6 Jun 2022 19:19:48 -0700 Subject: Simplify logs config --- src/main/java/org/traccar/config/Keys.java | 7 ------- src/main/java/org/traccar/web/WebServer.java | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) (limited to 'src/main/java/org') diff --git a/src/main/java/org/traccar/config/Keys.java b/src/main/java/org/traccar/config/Keys.java index f5370874d..ba576397b 100644 --- a/src/main/java/org/traccar/config/Keys.java +++ b/src/main/java/org/traccar/config/Keys.java @@ -1198,13 +1198,6 @@ public final class Keys { "location.longitudeHemisphere", Collections.singletonList(KeyType.GLOBAL)); - /** - * Enable Jetty Request Log. - */ - public static final ConfigKey WEB_REQUEST_LOG_ENABLE = new ConfigKey<>( - "web.requestLog.enable", - Collections.singletonList(KeyType.GLOBAL)); - /** * Jetty Request Log Path. * The path must include the string "yyyy_mm_dd", which is replaced with the actual date when creating and rolling diff --git a/src/main/java/org/traccar/web/WebServer.java b/src/main/java/org/traccar/web/WebServer.java index 9af9fd33a..06676fb41 100644 --- a/src/main/java/org/traccar/web/WebServer.java +++ b/src/main/java/org/traccar/web/WebServer.java @@ -118,7 +118,7 @@ public class WebServer implements LifecycleObject { handlers.addHandler(new GzipHandler()); server.setHandler(handlers); - if (config.getBoolean(Keys.WEB_REQUEST_LOG_ENABLE)) { + if (config.hasKey(Keys.WEB_REQUEST_LOG_PATH)) { RequestLogWriter logWriter = new RequestLogWriter(config.getString(Keys.WEB_REQUEST_LOG_PATH)); logWriter.setAppend(true); logWriter.setRetainDays(config.getInteger(Keys.WEB_REQUEST_LOG_RETAIN_DAYS)); -- cgit v1.2.3