Spring Boot Test ignores logging.level

后端 未结 6 773
独厮守ぢ
独厮守ぢ 2020-12-13 01:59

One of my maven module ignores my logging levels when running tests.

In src/test/resources I have application.properties:

app         


        
6条回答
  •  天涯浪人
    2020-12-13 02:30

    Okay what I did now, in all modules I configured as follows:

    src/main/resources:
    I use logging configuration in application.properies like logging.level.* as described in the question.

    src/test/resources:
    I use logback-test.xml like:

    
    
        
        
        
        
        
        
        
        
        
    
    

    But I still don't understand, why in few modules I could use application.properties, but in another module it ignores ... But for now it works for me as it is.

    But maybe few hints with background knowledge are still welcome.

    I dont mark my answer as solution, cos it still feels like a workaround.

提交回复
热议问题