While starting up, Logback attempts to create/open the logging files. However, on current Spring Boot's implementation, if the files cannot be opened the application is shut down.
This seems to be an intentional behavior, as seen on SpringBoot's git.
What I would prefer is either to default to Tomcat's log, or to disable log altogether, but allowing my application to keep running. As we need to deploy it on various environments and for a short lifespan, I would rather not have to customize the log path on every instance to be deployed.
Still, I have not found any property on Spring Boot nor Logback setups which may allow me to do this.
Is there any way to bypass the IllegalStateException?
This is the error thrown on startup:
java.lang.IllegalStateException: Logback configuration error detected:
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE-MESSAGES-BODIES] - Failed to create parent directories for [C:\MY_PATH\file.log]
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE-MESSAGES-BODIES] - openFile(C:\MY_PATH\file.log,true) call failed. java.io.FileNotFoundException: C:\MY_PATH\file.log (The device is not ready)
ERROR in ch.qos.logback.core.rolling.RollingFileAppender[FILE-LOG] - Failed to create parent directories for [C:\MY_PATH\file.log]
Using Spring Boot (v1.5.3)