aboutsummaryrefslogtreecommitdiffstats
path: root/policy-endpoints/src
diff options
context:
space:
mode:
authorjrh3 <jrh3@att.com>2017-08-23 09:40:28 -0400
committerjrh3 <jrh3@att.com>2017-08-23 16:13:16 -0400
commit95dafe8eaedf270c639adf0e51481f0172d2b808 (patch)
tree4868942f1509366f079afdcfd35e33450eb3fa2c /policy-endpoints/src
parent36cf73f8313cbd1baac4bc41565bee23690fc152 (diff)
Add access.log to jetty server
Added a single line to the code that creates the jetty server so that it will log messages in access.log format. Also added lines to various logback.xml files to actually write the output from the jetty server to the access.log. Made some revisions per comments: - removed spaces around parameters - added "Out" suffix - changed suffix of archived files - changed size to 1MB Modified logback*.xml files to include jetty "access log" content in the already-existing network.log. Issue-Id: POLICY-161 Change-Id: I3e3769c06a22aaffea0e09abbec3387cc62f246f Signed-off-by: jrh3 <jrh3@att.com>
Diffstat (limited to 'policy-endpoints/src')
-rw-r--r--policy-endpoints/src/main/java/org/onap/policy/drools/http/server/internal/JettyServletServer.java2
1 files changed, 2 insertions, 0 deletions
diff --git a/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/internal/JettyServletServer.java b/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/internal/JettyServletServer.java
index 66261349..55d058f5 100644
--- a/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/internal/JettyServletServer.java
+++ b/policy-endpoints/src/main/java/org/onap/policy/drools/http/server/internal/JettyServletServer.java
@@ -25,6 +25,7 @@ import org.eclipse.jetty.security.HashLoginService;
import org.eclipse.jetty.security.authentication.BasicAuthenticator;
import org.eclipse.jetty.server.Server;
import org.eclipse.jetty.server.ServerConnector;
+import org.eclipse.jetty.server.Slf4jRequestLog;
import org.eclipse.jetty.servlet.ServletContextHandler;
import org.eclipse.jetty.util.security.Constraint;
import org.eclipse.jetty.util.security.Credential;
@@ -134,6 +135,7 @@ public abstract class JettyServletServer implements HttpServletServer, Runnable
this.context.setContextPath(contextPath);
this.jettyServer = new Server();
+ this.jettyServer.setRequestLog(new Slf4jRequestLog());
this.connector = new ServerConnector(this.jettyServer);
this.connector.setName(name);