Spring boot 从application.yml使用spring引导的外部日志
我想有一个我的应用程序的外部日志,但我还没有做到这一点。我在参考资料文件夹中有logaback.xml:Spring boot 从application.yml使用spring引导的外部日志,spring-boot,logback,Spring Boot,Logback,我想有一个我的应用程序的外部日志,但我还没有做到这一点。我在参考资料文件夹中有logaback.xml: <?xml version="1.0" encoding="UTF-8"?> <configuration> <include resource="org/springframework/boot/logging/logback/base.xml"/> <logger name="org.springframework.web" level=
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<include resource="org/springframework/boot/logging/logback/base.xml"/>
<logger name="org.springframework.web" level="DEBUG"/>
</configuration>
在tmp文件夹中,只有一个文件是spring.log,其中包含来自应用程序的所有日志,但我需要一个具有其他名称且在不同文件夹中具有调试级别的文件
有人能帮我吗
谢谢大家! 我刚刚解决了它。问题是我忘了删除字符#。
# ========================
# LOGGING
# ========================
#logging:
file: /tmp/application.log
# Enable this to specify the path and the name of the log file. By default, it creates a
# file named spring.log in the temp directory.