EN
Spring Boot 2 - enable colors in application console (output logs)
6 points
In this short article, we would liek to show how to enable colors in output logs in Spring Boot 2 application.
Quick solutions:
- add
spring.output.ansi.enabled=ALWAYS
line toapplication.properties
file,
- add
--spring.output.ansi.enabled=ALWAYS
option tojava
command,
e.g.java -jar app.jar --spring.output.ansi.enabled=ALWAYS

Simple steps:
1. open src/main/resources/application.properties
file,
2. update the file adding the line:
xxxxxxxxxx
1
# ...
2
3
spring.output.ansi.enabled=ALWAYS
4
5
# ...
Note: possible values are:
ALWAYS
,DETECT
andNEVER
.