Skip to content
This repository was archived by the owner on Nov 24, 2025. It is now read-only.

Commit 19bea59

Browse files
zrhoffmanjpappa200
andcommitted
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 cda63c9)
1 parent 4aad56f commit 19bea59

File tree

1 file changed

+3
-2
lines changed
  • infrastructure/ansible/roles/traffic-router/defaults

1 file changed

+3
-2
lines changed

infrastructure/ansible/roles/traffic-router/defaults/main.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -139,12 +139,13 @@ tr_log4j2_opts: |
139139
</Console>
140140
<RollingFile name="traffic_router_access"
141141
fileName="{{tr_log_dir}}/access.log"
142-
filePattern="{{tr_log_dir}}/access.log.%i" >
142+
filePattern="{{tr_log_dir}}/access.log.%d{MM-dd-yyyy}-%2i" >
143143
<PatternLayout pattern="%m%n" />
144144
<Policies>
145145
<SizeBasedTriggeringPolicy size="200MB" />
146+
<CronTriggeringPolicy schedule="0 0 * * * ?" />
146147
</Policies>
147-
<DefaultRolloverStrategy max="10" />
148+
<DefaultRolloverStrategy max="50" />
148149
<ThresholdFilter level="INFO" />
149150
</RollingFile>
150151
<RollingFile name="traffic_router"

0 commit comments

Comments
 (0)