Skip to content

Commit d891757

Browse files
committed
Fix log4j2 directory property; add zip compression
The recent log4j2 version bump no longer ignores the invalid and unused line specifying dir.logs causing the server to fail to start. That line has been removed and converted to a proper log4j2 property, which the file appender now references to allow the user to more easily change the output directory. Additionally, zip compression was added to the rolling file appender for previous versions. Signed-off-by: Tony Germano <tony@germano.name>
1 parent 9a36030 commit d891757

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

server/conf/log4j2.properties

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
# sample properties to initialize log4j
22
rootLogger = ERROR,stdout,fout
33

4+
# Set a custom variable for the log directory
5+
property.log.dir = logs
6+
47
# stdout appender
58
appender.console.type = Console
69
appender.console.name = stdout
@@ -9,11 +12,10 @@ appender.console.layout.pattern = %-5p %d{yyyy-MM-dd HH:mm:ss.SSS} [%t] %c: %m%n
912
appender.console.layout.charset = UTF-8
1013

1114
# file appender
12-
dir.logs = logs
1315
appender.rolling.type = RollingFile
1416
appender.rolling.name = fout
15-
appender.rolling.fileName = logs/mirth.log
16-
appender.rolling.filePattern = logs/mirth.log.%i
17+
appender.rolling.fileName = ${log.dir}/mirth.log
18+
appender.rolling.filePattern = ${log.dir}/mirth.log.%i.zip
1719
appender.rolling.policies.type = Policies
1820
appender.rolling.policies.size.type = SizeBasedTriggeringPolicy
1921
appender.rolling.policies.size.size = 500KB

0 commit comments

Comments
 (0)