logback的layout以及encode相关配置

logback官方文档地址

http://logback.qos.ch/manual/layouts.html


        xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
        xsi:noNamespaceSchemaLocation="http://www.padual.com/java/logback.xsd"
        debug="false" scan="true" scanPeriod="30 second">

   
   

   
   
   
       
            %d{yyyy-MM-dd HH:mm:ss} %-5p [%X{traceId}/%c{1}] - %m%n
           

       

       
            WARN
       

   

   
   
   

 


    
    -->
                /data/tomcat/logs/biz/biz_gateway-zuul.log.%d{yyyyMMddHH}
    
    
        
            
            
                
                    {"@timestamp": "%date{yyyy-MM-dd HH:mm:ss}","source_host": "${HOSTNAME}","file": "%F","method":"%M","level":"%p","line_number":"%L","thread_name":"%t","@version":1,"logger_name":"%logger","message":"%m","class":"%C","mdc":"%X"}
                
            
            
                
                    100
                    20480
                    true
                
            
        
    
    
        INFO
        ACCEPT
        DENY
    

   
   
   

   
   
       
       
   

你可能感兴趣的:(日志,java)