mirror of
https://github.com/corda/corda.git
synced 2025-02-21 17:56:54 +00:00
Fix ANSI logging on Windows
This commit is contained in:
parent
334ed4806b
commit
f44dd969ce
@ -12,6 +12,7 @@ import net.corda.node.services.config.ConfigHelper
|
|||||||
import net.corda.node.services.config.FullNodeConfiguration
|
import net.corda.node.services.config.FullNodeConfiguration
|
||||||
import net.corda.node.utilities.ANSIProgressObserver
|
import net.corda.node.utilities.ANSIProgressObserver
|
||||||
import org.fusesource.jansi.Ansi
|
import org.fusesource.jansi.Ansi
|
||||||
|
import org.fusesource.jansi.AnsiConsole
|
||||||
import org.slf4j.LoggerFactory
|
import org.slf4j.LoggerFactory
|
||||||
import java.lang.management.ManagementFactory
|
import java.lang.management.ManagementFactory
|
||||||
import java.net.InetAddress
|
import java.net.InetAddress
|
||||||
@ -139,6 +140,9 @@ private fun messageOfTheDay(): Pair<String, String> {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun drawBanner() {
|
private fun drawBanner() {
|
||||||
|
// This line makes sure ANSI escapes work on Windows, where they aren't supported out of the box.
|
||||||
|
AnsiConsole.systemInstall()
|
||||||
|
|
||||||
val (msg1, msg2) = Emoji.renderIfSupported { messageOfTheDay() }
|
val (msg1, msg2) = Emoji.renderIfSupported { messageOfTheDay() }
|
||||||
|
|
||||||
println(Ansi.ansi().fgBrightRed().a(
|
println(Ansi.ansi().fgBrightRed().a(
|
||||||
|
Loading…
x
Reference in New Issue
Block a user