Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/blackberry/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring boot 从application.yml使用spring引导的外部日志_Spring Boot_Logback - Fatal编程技术网

Spring boot 从application.yml使用spring引导的外部日志

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=

我想有一个我的应用程序的外部日志,但我还没有做到这一点。我在参考资料文件夹中有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="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.