0

I am using Spring Boot to build a simple webapp, however, I am not using the embedded Tomcat container. Instead, I am building a .war file and deploying manually to a Tomcat 7 instance.

I am using Logback with the following configuration:

<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<property name="LOG_FILE" value="./logs/jcme.log" />
<include resource="org/springframework/boot/logging/logback/base.xml" />

    <!-- 3rd Party Loggers -->
    <logger name="org.springframework.web" level="INFO" />
    <logger name="org.springframework.boot" level="INFO" />
    <logger name="org.hibernate" level="INFO" />
    <logger name="org.quartz" level="INFO" />
</configuration>

When running the .war file inside Tomcat running in Eclipse, the log appends properly to both STDOUT and FILE appenders as configured in "../logback/base.xml".

However, when deploying this to an external Tomcat container, the "jcme.log" file is created, but is empty.

What am I missing?

elpisu
  • 759
  • 3
  • 11
  • 18

1 Answers1

2

Please have a look on this. I had the same issue and created a setenv.bat file in my /bin with following code and it worked:

    set logging.config=classpath:/logback.xml
Community
  • 1
  • 1
amique
  • 2,176
  • 7
  • 34
  • 53