This is an automated email from the ASF dual-hosted git repository.
srijeet0406 pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/trafficcontrol.git
The following commit(s) were added to refs/heads/master by this push:
new cda63c9 Ansible TR: Keep hourly archives of `access.log` (#6517)
cda63c9 is described below
commit cda63c97bba9d5fbc6f04a848a842c79c0815b96
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]>
---
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 b88b8f2..baea6ea 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"