diff --git a/server/conf/log4j2.properties b/server/conf/log4j2.properties index d2688e84b..5afd44498 100644 --- a/server/conf/log4j2.properties +++ b/server/conf/log4j2.properties @@ -1,6 +1,9 @@ # sample properties to initialize log4j rootLogger = ERROR,stdout,fout +# Set a custom variable for the log directory +property.log.dir = logs + # stdout appender appender.console.type = Console 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 appender.console.layout.charset = UTF-8 # file appender -dir.logs = logs appender.rolling.type = RollingFile appender.rolling.name = fout -appender.rolling.fileName = logs/mirth.log -appender.rolling.filePattern = logs/mirth.log.%i +appender.rolling.fileName = ${log.dir}/mirth.log +appender.rolling.filePattern = ${log.dir}/mirth.log.%i.zip appender.rolling.policies.type = Policies appender.rolling.policies.size.type = SizeBasedTriggeringPolicy appender.rolling.policies.size.size = 500KB