How can I configure Logback to log different levels for a logger to different destinations?

前端 未结 12 1795
挽巷
挽巷 2020-11-28 18:37

How can I configure Logback to log different levels for a logger to different destinations?

For example, given the following Logback configuration, will Logback reco

12条回答
  •  爱一瞬间的悲伤
    2020-11-28 19:00

    I believe this would be the simplest solution:

    
        selenium-plugin
          
        
            System.out
            
                INFO
                ACCEPT
                DENY
            
            
                [%d{yyyy-MM-dd HH:mm:ss.SSS}] [%level] %msg%n
            
        
        
                System.err
            
                ERROR
                ACCEPT
                DENY
            
             
                [%d{yyyy-MM-dd HH:mm:ss.SSS}] [%level] [%thread] %logger{10} [%file:%line] %msg%n 
             
        
        
            
            
        
    
    

提交回复
热议问题