Add support for configuring Jetty's request log via the environment
See gh-8819
This commit is contained in:
committed by
Stephane Nicoll
parent
45f76965f6
commit
ce892a06e4
@@ -159,6 +159,20 @@ content into your application; rather pick only the properties that you need.
|
||||
server.jetty.acceptors= # Number of acceptor threads to use.
|
||||
server.jetty.max-http-post-size=0 # Maximum size in bytes of the HTTP post or put content.
|
||||
server.jetty.selectors= # Number of selector threads to use.
|
||||
server.jetty.accesslog.enabled=false # Enable access log.
|
||||
server.jetty.accesslog.filename= # Filename of Jetty access logs.
|
||||
server.jetty.accesslog.retainDays=31 # number of days before rotated log files are deleted.
|
||||
server.jetty.accesslog.append=true # append to log flag.
|
||||
server.jetty.accesslog.filenameDateFormat=yyyy_MM_dd # log file name date format.
|
||||
server.jetty.accesslog.extended= true # extended request log format flag.
|
||||
server.jetty.accesslog.logTimeZone= GMT # the timezone of the request log
|
||||
server.jetty.accesslog.logCookies=false # Controls logging of the request cookies.
|
||||
server.jetty.accesslog.logServer=false # Controls logging of the request hostname.
|
||||
server.jetty.accesslog.logLatency=false # Controls logging of request processing time.
|
||||
server.jetty.accesslog.logDateFormat= # Set the timestamp format for request log entries in the file. If this is not set, the pre-formated request timestamp is used.
|
||||
server.jsp-servlet.class-name=org.apache.jasper.servlet.JspServlet # The class name of the JSP servlet.
|
||||
server.jsp-servlet.init-parameters.*= # Init parameters used to configure the JSP servlet
|
||||
server.jsp-servlet.registered=true # Whether or not the JSP servlet is registered
|
||||
server.port=8080 # Server HTTP port.
|
||||
server.server-header= # Value to use for the Server response header (no header is sent if empty)
|
||||
server.use-forward-headers= # If X-Forwarded-* headers should be applied to the HttpRequest.
|
||||
|
||||
@@ -636,7 +636,7 @@ sample project for an example.
|
||||
|
||||
[[howto-configure-accesslogs]]
|
||||
=== Configure Access Logging
|
||||
Access logs can be configured for Tomcat and Undertow via their respective namespaces.
|
||||
Access logs can be configured for Tomcat, Undertow and Jetty via their respective namespaces.
|
||||
|
||||
For instance, the following logs access on Tomcat with a
|
||||
https://tomcat.apache.org/tomcat-8.0-doc/config/valve.html#Access_Logging[custom pattern].
|
||||
@@ -664,6 +664,16 @@ Access logging for undertow can be configured in a similar fashion
|
||||
Logs are stored in a `logs` directory relative to the working directory of the
|
||||
application. This can be customized via `server.undertow.accesslog.directory`.
|
||||
|
||||
Access logging for jetty can be configured in a similar fashion
|
||||
|
||||
[source,properties,indent=0,subs="verbatim,quotes,attributes"]
|
||||
----
|
||||
server.jetty.accesslog.enabled=true
|
||||
server.jetty.accesslog.filename=
|
||||
----
|
||||
|
||||
If no filename logs will go to System.err.
|
||||
For more details please refer to https://www.eclipse.org/jetty/documentation/9.3.x/configuring-jetty-request-logs.html.
|
||||
|
||||
|
||||
[[howto-use-behind-a-proxy-server]]
|
||||
|
||||
Reference in New Issue
Block a user