Skip to content
This repository has been archived by the owner on Nov 23, 2021. It is now read-only.

Logback fails to create files/directories #512

Open
Siroque opened this issue Nov 3, 2016 · 1 comment
Open

Logback fails to create files/directories #512

Siroque opened this issue Nov 3, 2016 · 1 comment

Comments

@Siroque
Copy link

Siroque commented Nov 3, 2016

We have found out that the restaurant example application deployment fails with an error:
Issue - java.lang.IllegalStateException: Logback configuration error detected: ERROR in ch.qos.logback.core.rolling.RollingFileAppender[ERROR_APPENDER] - Failed to create parent directories for [/var/lib/tomcat8/../logs/]
It turned out that the app server (Tomcat) have had no permissions by default to write to this path. Hence we had to change the path to be just "logs" (within server/src/main/resources/logback.xml).

@hohwille
Copy link
Member

hohwille commented Dec 5, 2017

Link:
https://github.com/oasp/oasp4j/blob/develop/samples/server/src/main/resources/logback.xml#L6

So with spring-boot this config is actually correct.
I can not say about your exact setup but a regular tomcat should also be started inside CATALINA_BASE but in your case it seems to be started inside CATALINA_HOME (/var/lib/tomcat8).
You might need to checkup your startup scripts.

However, we should rework and try to find a way to move that actual property out of the XML and reference a property instead that can be configured via spring boots application.properties somehow. Then everybody will have the freedom to easily tweak and override the settings to his needs.

Meanwhile, just create your own copy of the file and customize to your needs inside your WAR project.

@hohwille hohwille added this to the backlog-asap milestone Dec 5, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

2 participants