I want to disable colour in the Spring Boot output completely as the logs are going to be viewed as plaintext, not in a terminal.
If I pass in --spring.output.ansi.enabled=NEVER
as a command line argument it disables some colour such as the text saying Spring Boot, but the logs immediately after are as colourful as always. How can I disable all colour entirely?
I had simular issue with logback.xml
. Resolved it by setting withJansi to false and removing colors from pattern. Like this:
<appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
<withJansi>false</withJansi>
<encoder>
<pattern>%d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n</pattern>
</encoder>
</appender>
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With