Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

WindowsAnsiOutputStream class not found

When I start Micronaut project, in the IntelliJ it shows me at the Run box error that

Caused by: java.lang.ClassNotFoundException: org.fusesource.jansi.WindowsAnsiOutputStream

I know that is something which makes console output better, but I didn't found how fix it. Project ran successfully, but I want to try fix it...

Intellij screenshot

like image 554
Andrew Sneck Avatar asked Dec 17 '22 15:12

Andrew Sneck


1 Answers

It is a problem with colored logging in Logback on Windows. To workaround that you can set withJansi to false in logback.xml config file:

<configuration>
    <appender name="STDOUT" class="ch.qos.logback.core.ConsoleAppender">
        <withJansi>false</withJansi>
        <encoder>
            <pattern>%cyan(%d{HH:mm:ss.SSS}) %gray([%thread]) %highlight(%-5level) %magenta(%logger{36}) - %msg%n</pattern>
        </encoder>
    </appender>
    ...
</configuration>

There is also an Issue created for that, see: https://github.com/micronaut-projects/micronaut-core/issues/1521

like image 195
cgrim Avatar answered Jan 11 '23 20:01

cgrim