Formatting slf4j to log message types with colors

前端 未结 5 2291
情书的邮戳
情书的邮戳 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:12

    It's not possible to change colors of slf4j logging, because there are no formatters. SLF4J is a middleware between your application and some logging facility, for example, Log4j or Logback.

    You can change colors in Log4j output, as explained here. I would recommend to use MulticolorLayout from jcabi-log

提交回复
热议问题