victory
victory

Reputation: 185

What is making spring boot console colorful?

When I start my own spring boot with 2.2.2 release, it is only white text. When I see very similar examples with the same spring boot version, they have colored console output. What is the reason? And where is it defined? Thank you

Upvotes: 0

Views: 374

Answers (1)

smndiaye
smndiaye

Reputation: 468

it can be done in your property file. here is an exemple.

   logging:
      level:
        root: INFO
      pattern:
        console: "%black(%d{YYYY-MM-dd HH:mm:ss.SSS}) ===== %highlight(%-5level) ===== [%blue(%thread)] ===== %yellow(%logger{36}.%M):%L ===== %msg%n%throwable"

Please do also check spring docs for more about logging https://docs.spring.io/spring-boot/docs/1.5.x/reference/html/howto-logging.html

Upvotes: 1

Related Questions