Logback AyncAppender not printing File and Line number

前端 未结 2 704
自闭症患者
自闭症患者 2020-12-29 12:52

I have the following configuration file that is very similar to the standard example in the Logback manual. The only difference is the addition of [%F:%L]. while everything

2条回答
  •  無奈伤痛
    2020-12-29 13:30

    You need to set AsyncAppender's includeCallerData property to true. Here is the modified config file:

    
        
          myapp.log
          %logger{35} - [%F:%L] - %msg%n
        
    
        
          
          
          true
        
    
        
     
    

提交回复
热议问题