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

前端 未结 12 1812
挽巷
挽巷 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:06

    
     
        ${storm.log.dir}/${logfile.name}
        
          ${storm.log.dir}/${logfile.name}.%i
          1
          9
        
    
        
          100MB
        
    
        
          %d{yyyy-MM-dd'T'HH:mm:ss.SSSZZ} %c{1} [%p] %m%n
        
     
    
     
        ${storm.log.dir}/access.log
        
          ${storm.log.dir}/access.log.%i
          1
          9
        
    
        
          100MB
        
    
        
          %d{yyyy-MM-dd'T'HH:mm:ss.SSSZZ} %c{1} [%p] %m%n
        
      
    
      
        ${storm.log.dir}/metrics.log
        
          ${storm.log.dir}/logs/metrics.log.%i
          1
          9
        
    
        
          2MB
        
    
        
          %d %-8r %m%n
        
      
    
      
        
      
    
      
        
        
      
    
      
        
        
      
    
    
    
    So here is the logback file in which I am not printing backtype.storm.metric.LoggingMetricsConsumer info level if i say additivity = "true" then for for all classes in backtype.* this rule will be applied
    

提交回复
热议问题