1

How to display error message with some colors using slf4j logger?
Any suggestion in this regard will be much appreciated.

Sumit Singh
  • 15,743
  • 6
  • 59
  • 89
user1693602
  • 11
  • 1
  • 2
  • 2
    Have a look at this similar SO question:http://stackoverflow.com/questions/7848325/making-a-log4j-console-appender-use-different-colors-for-different-threads if your backend logging implementation is log4j. – Sébastien Le Callonnec Sep 24 '12 at 06:50

1 Answers1

1

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.

Community
  • 1
  • 1
yegor256
  • 102,010
  • 123
  • 446
  • 597