Prevent Spring Boot from printing logs to console

后端 未结 5 1746
别跟我提以往
别跟我提以往 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:42

    A similar discussion can be found here.

    My logback.xml looks like that:

    
    
      
      
    
      
        
      
    
    

    Just in case you still experience an issue: I have read many discussions about that topic and it was not working at all for me. Unfortunately I have made a really stupid mistake when I have created the file logback.xml for the very first time: A space was added at the beginning of the filename. Therefore the file was never used. So just have another look on the filename, add the file in "src/main/resources" and remove any "logging.config" entries from your property files.

提交回复
热议问题