From 38d57f4f18de5736d0df9e4d5c8ac9352ed4bd39 Mon Sep 17 00:00:00 2001 From: jcardus Date: Tue, 29 Dec 2020 00:25:07 +0000 Subject: deprecated NCSARequestLog --- src/main/java/org/traccar/web/WebServer.java | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/main') diff --git a/src/main/java/org/traccar/web/WebServer.java b/src/main/java/org/traccar/web/WebServer.java index 44d78cd27..28fa45273 100644 --- a/src/main/java/org/traccar/web/WebServer.java +++ b/src/main/java/org/traccar/web/WebServer.java @@ -19,8 +19,9 @@ import org.eclipse.jetty.http.HttpCookie; import org.eclipse.jetty.http.HttpMethod; import org.eclipse.jetty.http.HttpStatus; import org.eclipse.jetty.proxy.AsyncProxyServlet; -import org.eclipse.jetty.server.NCSARequestLog; +import org.eclipse.jetty.server.CustomRequestLog; import org.eclipse.jetty.server.Request; +import org.eclipse.jetty.server.RequestLogWriter; import org.eclipse.jetty.server.Server; import org.eclipse.jetty.server.handler.ErrorHandler; import org.eclipse.jetty.server.handler.HandlerList; @@ -103,11 +104,10 @@ public class WebServer { server.setHandler(handlers); if (config.getBoolean(Keys.WEB_REQUEST_LOG_ENABLE)) { - NCSARequestLog requestLog = new NCSARequestLog(config.getString(Keys.WEB_REQUEST_LOG_PATH)); - requestLog.setAppend(true); - requestLog.setExtended(true); - requestLog.setLogLatency(true); - requestLog.setRetainDays(config.getInteger(Keys.WEB_REQUEST_LOG_RETAIN_DAYS)); + RequestLogWriter logWriter = new RequestLogWriter(config.getString(Keys.WEB_REQUEST_LOG_PATH)); + logWriter.setAppend(true); + logWriter.setRetainDays(config.getInteger(Keys.WEB_REQUEST_LOG_RETAIN_DAYS)); + CustomRequestLog requestLog = new CustomRequestLog(logWriter, CustomRequestLog.NCSA_FORMAT); server.setRequestLog(requestLog); } } -- cgit v1.2.3