----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: https://reviews.apache.org/r/52583/ -----------------------------------------------------------
(Updated Oct. 10, 2016, 7:26 p.m.) Review request for Ambari, Alejandro Fernandez, Jonathan Hurley, Nate Cole, and Sid Wagle. Changes ------- Hi, I have modified the code to take couple of more things. 1. now access/request log prints time taken for each call to Ambari-server 2. have disabled requests logs bydefault. 3. havetaken care one of the issue relating to handles. 4. corrected incorrect comments. Regards, Amar Bugs: AMBARI-18543 https://issues.apache.org/jira/browse/AMBARI-18543 Repository: ambari Description ------- Request/access log feature in Ambari-server 1. Have provided option in ambari.properties to configure the path - "server.requestlogs.path" By default has given it as server.requestlogs.path=\var\log\ambari-server\ambari-access-yyyy_mm_dd.log 2. If some customers does not want this to enable then removing "server.requestlogs.path" property will not create any file. 3. currently have set the number of reatin days as 15 4. if somebody wants to reduce/increase that value then add that property in ambari.properties file 5. log content should look alike below, 192.168.65.1 - - [05/Oct/2016:23:45:18 +0000] "GET / HTTP/1.1" 404 618 "-" "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:48.0) Gecko/20100101 Firefox/48.0" Please review and provide your comments. Diffs (updated) ----- ambari-server/conf/windows/ambari.properties 64cce3b ambari-server/src/main/java/org/apache/ambari/server/configuration/Configuration.java 2e850ef ambari-server/src/main/java/org/apache/ambari/server/controller/AmbariServer.java 5e498f0 Diff: https://reviews.apache.org/r/52583/diff/ Testing ------- 1. install and start Ambari-server, access the UI. Expected Result: server should create ambari-server-access-yyyy_mm_dd.log Result: PASS 2. access few links in ambari server UI Expected Result: server should log URL and response code Result: PASS 3. Remove entry server.requestlogs.path from ambari.properties Expected Result: server should not create any request log Result: PASS 4. change the log path server.requestlogs.path in ambari.properties and restart server Expected Result: it should create request log in new path Result: PASS Thanks, Amarnath reddy pappu