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=ALWAYSline toapplication.propertiesfile,
- add
--spring.output.ansi.enabled=ALWAYSoption tojavacommand,
e.g.java -jar app.jar --spring.output.ansi.enabled=ALWAYS
Practical example
Simple steps:
1. open src/main/resources/application.properties file,
2. update the file adding the line:
# ...
spring.output.ansi.enabled=ALWAYS
# ...
Note: possible values are:
ALWAYS,DETECTandNEVER.