[ 
https://issues.apache.org/jira/browse/RANGER-3632?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17504078#comment-17504078
 ] 

kirby zhou commented on RANGER-3632:
------------------------------------

Notes of patch

1. add options of access_log

# set it to false will disable log rotation
ranger.accesslog.rotate.enabled = true on default
# set it to true will result in the current access log name without dateformat.
ranger.accesslog.rotate.rename_on_rotate = false on default

2. rename max.days to max_days, make the name look more comfortable
ranger.accesslog.rotate.max_days = 15

3. move "-" from default prefix to default dateformat
# It can helps for using access log name without dateformat
  valve.setPrefix(EmbeddedServerUtil.getConfig(ACCESS_LOG_PREFIX,"access-" + 
hostName));
  valve.setFileDateFormat(EmbeddedServerUtil.getConfig(ACCESS_LOG_DATE_FORMAT, 
"-yyyy-MM-dd.HH"));

4. mv ews/webapp/WEB-INF/logback.xml to ews/webapp/WEB-INF/classes/conf[.dist]
# It can helps person to adjust log options easier.

5. add "%D" to default access-log
# It can help admins to get timecost from access-log instead of expansive perf 
log.

6. fix a lot of log4j name remains to logback.


> Improve ranger logs,  RENAME_ON_ROTATE and others
> -------------------------------------------------
>
>                 Key: RANGER-3632
>                 URL: https://issues.apache.org/jira/browse/RANGER-3632
>             Project: Ranger
>          Issue Type: Improvement
>          Components: admin, kms
>    Affects Versions: 3.0.0, 2.3.0
>            Reporter: kirby zhou
>            Assignee: kirby zhou
>            Priority: Major
>             Fix For: 3.0.0, 2.3.0
>
>
> Currently, the filename of the access-log in use has a timestamp as the 
> suffix. This brings trouble to some log monitoring and analysis programs, 
> such as "tail -f access-log"
> Need to add an option to enable tomcat's RenameOnRotate capability to fix the 
> file name of access-log.
>  
> {code:java}
> // in EmbeddedServer::start()
> valve.setRenameOnRotate(
> EmbeddedServerUtil.getConfig(ACCESS_LOG_RENAME_ON_ROTATE,  false);
> );{code}
>  



--
This message was sent by Atlassian Jira
(v8.20.1#820001)

Reply via email to