Formatting slf4j to log message types with colors

前端 未结 5 2236
情书的邮戳
情书的邮戳 2021-02-07 04:55

I am using slf4j for logging in my Java Application. It involves a lot logging and log monitoring.
Sometimes it is really difficult to read and find information from logs w

5条回答
  •  北荒
    北荒 (楼主)
    2021-02-07 05:17

    Add next appender into logback.xml to colorize logs output:

    
            
            
                %d %highlight(%-5level) [%thread] %cyan(%logger{15}): %msg%n
            
    
    

提交回复
热议问题