I am getting log.dir_IS_UNDEFINED error even though I'm passing log.dir as a java parameter -Dlog.dir="/logs"
Here is a snippet of my logback.xml file
<appender name="FILE" class="ch.qos.logback.core.rolling.RollingFileAppender">
<file>${log.dir}/crm.log</file>
<rollingPolicy class="ch.qos.logback.core.rolling.TimeBasedRollingPolicy">
I suggest to switch to Spring Boot logging support. Take a look at configuration section of Spring Boot docs
You can use this:
# LOGGING
logging.path=/var/log
logging.file=myapp.log
Or you can define it also via system properties:
-Dlogging.path=/var/log -Dlogging.file=myapp.log
According this section of Spring Boot Docs about logging with Logback, you can also use ${LOG_FILE}
and ${LOG_PATH}
environment variables.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With