This is an automated email from the ASF dual-hosted git repository.

zrhoffman pushed a commit to branch 6.1.x
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git

commit 19bea598e83957e06203c156cd8b7ebce57b1dfa
Author: Zach Hoffman <[email protected]>
AuthorDate: Wed Jan 19 15:48:39 2022 -0800

    Ansible TR: Keep hourly archives of `access.log` (#6517)
    
    * Keep a maximum of 50 access.log archives
    
    * Trigger an access.log rollover every hour
    
    * Add date and an integer counter to access.log archives
    
    * Limit each access.log archive to 200MB
    
    Co-authored-by: jpappa200 <[email protected]>
    (cherry picked from commit cda63c97bba9d5fbc6f04a848a842c79c0815b96)
---
 infrastructure/ansible/roles/traffic-router/defaults/main.yml | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/infrastructure/ansible/roles/traffic-router/defaults/main.yml 
b/infrastructure/ansible/roles/traffic-router/defaults/main.yml
index d5d2be3..5c6463e 100644
--- a/infrastructure/ansible/roles/traffic-router/defaults/main.yml
+++ b/infrastructure/ansible/roles/traffic-router/defaults/main.yml
@@ -139,12 +139,13 @@ tr_log4j2_opts: |
           </Console>
           <RollingFile name="traffic_router_access"
                        fileName="{{tr_log_dir}}/access.log"
-                       filePattern="{{tr_log_dir}}/access.log.%i" >
+                       
filePattern="{{tr_log_dir}}/access.log.%d{MM-dd-yyyy}-%2i" >
               <PatternLayout pattern="%m%n" />
               <Policies>
                   <SizeBasedTriggeringPolicy size="200MB" />
+                  <CronTriggeringPolicy schedule="0 0 * * * ?" />
               </Policies>
-              <DefaultRolloverStrategy max="10" />
+              <DefaultRolloverStrategy max="50" />
               <ThresholdFilter level="INFO" />
           </RollingFile>
           <RollingFile name="traffic_router"

Reply via email to