LOG_FILE_IS_UNDEFINED log file is being created in boot 1.4.5
See original GitHub issuewhen using vanila Spring boot 1.4.5 with the following logback configuration:
<configuration>
<appender name="FILE" class="ch.qos.logback.core.FileAppender">
<file>${LOG_FILE}</file>
<encoder>
<pattern>%logger{35} - %msg%n</pattern>
</encoder>
</appender>
<appender name="ASYNC" class="ch.qos.logback.classic.AsyncAppender">
<appender-ref ref="FILE" />
</appender>
<root level="INFO">
<appender-ref ref="ASYNC" />
</root>
</configuration>
and the following application.properties:
logging.file=/tmp/myapp.log
Empty file is being created in the name of LOG_FILE_IS_UNDEFINED. Looks like 2 async appenders are being created, one with LOG_FILE_IS_UNDEFINED as the file name and another one with the file name from the properties. The LOG_FILE_IS_UNDEFINED is stopped immediately and this is why the file is empty.
Issue Analytics
- State:
- Created 7 years ago
- Comments:19 (3 by maintainers)
Top Results From Across the Web
spring boot - SpringBoot with LogBack creating ...
I get similar issue, on application start following empty file might be generated: LOG_PATH_IS_UNDEFINED; LOG_FILE_IS_UNDEFINED. Reason.
Read more >26. Logging - Spring
Spring Boot uses Commons Logging for all internal logging but leaves the underlying log implementation open. Default configurations are provided for Java ...
Read more >How to use Logback in Spring Boot – Rolling Files Example
Logback Rolling File Logging via Spring Boot configuration file. Basically, you just need to specify the following two lines in the application.
Read more >Using Logback with Spring Boot - Spring Framework Guru
Spring Boot by default uses the popular logging framework logback for logging. Learn how to configure logback for Spring Boot in this post....
Read more >Spring Boot SLF4j Logback example - Mkyong.com
2. Maven. In Spring Boot, Logback is the default logging framework, just add spring-boot-starter-web , it will pull in ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hi, after changing the file to logback-spring.xml it is working fine! thanks
So, for us, we need the spring cloud components. Found that adding
<include resource="org/springframework/boot/logging/logback/base.xml" />right after the configuration tag at the top resolves the erroneous file generationSo our file starts