Skip to content

Commit c8bafd0

Browse files
author
ylexus
committed
proper cleanup of lod log files
1 parent 19a62e5 commit c8bafd0

File tree

1 file changed

+11
-2
lines changed

1 file changed

+11
-2
lines changed

app/src/main/resources/log4j2-ui.yaml

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ Configuration:
33
shutdownHook: disable
44
properties:
55
property:
6-
name: filename
7-
value: ${sys:user.home}/.jiottyphotosuploader/log/main.log
6+
- name: logDir
7+
value: ${sys:user.home}/.jiottyphotosuploader/log
8+
- name: filename
9+
value: ${logDir}/main.log
810
appenders:
911
RollingFile:
1012
name: FILE
@@ -18,6 +20,13 @@ Configuration:
1820
OnStartupTriggeringPolicy: { }
1921
DefaultRollOverStrategy:
2022
max: 10
23+
Delete:
24+
basePath: ${logDir}
25+
maxDepth: 1
26+
IfFileName:
27+
glob: main.log*
28+
IfLastModified:
29+
age: 60d
2130

2231
Loggers:
2332
logger:

0 commit comments

Comments
 (0)