I faced the same Issue in development environment so I tried another approach. If you have read official document It also states you can give custom configurations. And logging.path will use as a default if no custom configuration provided IMO.
I want to use log4j2 so I need custom pattern and other stuff. For that I actually put the log4j2.xml configuration file into the class-path. Look at my xml conf file for more details which actually worked in both dev and production.
<?xml version="1.0" encoding="UTF-8"?>
<configuration monitorInterval="30">
<properties>
<property name="app.name">my-app</property>
<property name="pattern">%d{ISO8601} %-5p %c - %m%n</property>
</properties>
<appenders>
<Console name="console" target="SYSTEM_OUT">
<PatternLayout pattern="${pattern}"/>
</Console>
<RollingRandomAccessFile name="my_app" append="false" fileName="${sys:user.home}\.${app.name}\logs\${app.name}.log"
filePattern="${sys:user.home}\.${app.name}\logs\$${date:yyyy-MM}/${app.name}-%d{yyyy-MM-dd}-%i.log.zip">
<PatternLayout>
<pattern>${pattern}</pattern>
</PatternLayout>
<Policies>
<SizeBasedTriggeringPolicy size="5 MB"/>
</Policies>
<DefaultRolloverStrategy max="10"/>
</RollingRandomAccessFile>
</appenders>
<loggers>
<root level="INFO">
<AppenderRef ref="console"/> <!-- To console -->
<AppenderRef ref="my_app"/>
</root>
<AsyncLogger name="com.rameysoft.streamline.main" additivity="FALSE" level="DEBUG">
<AppenderRef ref="console"/>
<AppenderRef ref="my_app"/>
</AsyncLogger>
</loggers>
</configuration>
${user.home}
instead... – Yanceapplication.properties
file might be too late. – Yance