Prevent Spring Boot from printing logs to console

后端 未结 5 1745
别跟我提以往
别跟我提以往 2020-12-24 15:03

I am using spring boot for my application and I am using default spring boot logging.

In my application.properties, I have added file path for log

5条回答
  •  星月不相逢
    2020-12-24 15:40

    Include file-appender.xml and not console-appender with following configuration in logback-spring.xml:

    
        
            
            
            
            
                
            
        
    

    You also need to add logging.file to your application.properties

    This is in compliance to what is mentioned in spring boot documentation - http://docs.spring.io/spring-boot/docs/current/reference/html/howto-logging.html

提交回复
热议问题