aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorjcardus <asklocation.net@gmail.com>2020-12-29 00:25:07 +0000
committerGitHub <noreply@github.com>2020-12-29 00:25:07 +0000
commit38d57f4f18de5736d0df9e4d5c8ac9352ed4bd39 (patch)
tree8683c22a5c8cb48b8727bd078da340a6ef79458e /src
parent64c5916acf62fc97a66726abdbdf05d8434c03db (diff)
downloadtrackermap-server-38d57f4f18de5736d0df9e4d5c8ac9352ed4bd39.tar.gz
trackermap-server-38d57f4f18de5736d0df9e4d5c8ac9352ed4bd39.tar.bz2
trackermap-server-38d57f4f18de5736d0df9e4d5c8ac9352ed4bd39.zip
deprecated NCSARequestLog
Diffstat (limited to 'src')
-rw-r--r--src/main/java/org/traccar/web/WebServer.java12
1 files changed, 6 insertions, 6 deletions
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);
}
}