Kirill
Kirill

Reputation: 6036

Centralized console coloring for Spring Boot project with several modules

I would like to get colors in my running console of Spring Boot project with several modules for Intellij IDEA. Like this:

enter image description here

In ordinary case I can add in application.properties line

spring.output.ansi.enabled=ALWAYS

or

logging.pattern.console= %d{yyyy-MMM-dd HH:mm:ss.SSS} [%thread] %highlight(%-5level) %cyan(%logger{15}) - %msg %n

In my current case I have several modules in my project enter image description here

and it is not very convinient to add such lines in application.properties in every module so I would like to use some centralized solution (like one plugin to set colors for a IntelliJ console for every application).

Does anyone have some ideas?

Upvotes: 0

Views: 832

Answers (2)

Using Windows and IntelliJ IDEA 2024.3 I just added to

Run Configurations -> Add VM Options

this flag:

-Dlog4j.skipJansi=false

Upvotes: 0

CrazyCoder
CrazyCoder

Reputation: 402095

Add -Dspring.output.ansi.enabled=ALWAYS in the Template Spring Boot run/debug configuration VM Options:

template

Upvotes: 2

Related Questions