diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2020-12-28 16:28:46 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-28 16:28:46 -0800 |
commit | 551298664bbac541450d83a021a2f8d77e65b216 (patch) | |
tree | 8683c22a5c8cb48b8727bd078da340a6ef79458e /src | |
parent | 64c5916acf62fc97a66726abdbdf05d8434c03db (diff) | |
parent | 38d57f4f18de5736d0df9e4d5c8ac9352ed4bd39 (diff) | |
download | traccar-server-551298664bbac541450d83a021a2f8d77e65b216.tar.gz traccar-server-551298664bbac541450d83a021a2f8d77e65b216.tar.bz2 traccar-server-551298664bbac541450d83a021a2f8d77e65b216.zip |
Merge pull request #4618 from jcardus/patch-1
Deprecated NCSARequestLog
Diffstat (limited to 'src')
-rw-r--r-- | src/main/java/org/traccar/web/WebServer.java | 12 |
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); } } |