Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spring Boot still outputs colour even with spring.output.ansi.enabled=NEVER

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?

like image 778
J Person Avatar asked Mar 15 '18 13:03

J Person


1 Answers

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>
like image 179
Alik Avatar answered Oct 22 '22 22:10

Alik