question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Output generated by Gradle plugin's bootRun task isn't color-coded

See original GitHub issue

spring-boot:run in the Maven plugin produces color-coded output, whereas bootRun in the Gradle plugin does not

Issue Analytics

  • State:closed
  • Created 9 years ago
  • Reactions:4
  • Comments:6 (2 by maintainers)

github_iconTop GitHub Comments

31reactions
nickgrealycommented, Mar 6, 2017

This setting worked for me:

bootRun {
    jvmArgs = ["-Dspring.output.ansi.enabled=ALWAYS"]
}

Source: http://stackoverflow.com/questions/28783832/getting-spring-boot-color-console-logging-working-within-intellij

0reactions
antonrudcommented, Jul 26, 2019

@nickgrealy thx for advice!

However, if working with Kotlin you might need to add following to your build.gradle.kts :

tasks.bootRun {
    jvmArgs = listOf("-Dspring.output.ansi.enabled=ALWAYS")
}

Worked for my project: Gradle 5.4.1, Kotlin 1.3.21, Spring 2.1.6.RELEASE

Read more comments on GitHub >

github_iconTop Results From Across the Web

Spring Boot Gradle Plugin Reference Guide
The task is automatically created when the java plugin is applied and is an instance of BootJar . The assemble task is automatically...
Read more >
Command-Line Interface - Gradle User Manual
When not attached to a console, the build output will use ANSI control characters to generate the rich output. Set to verbose to...
Read more >
Starting a Vaadin Project with Gradle | Get Started - Vaadin
This tutorial describes how to create, compile, and run a Vaadin application using the Vaadin Gradle plugin. To run the application, ...
Read more >
Get Started Quickly With Spring Boot Logging | Scalyr Blog
For this article we'll use Gradle for dependency management and to ... With Spring Boot, it's easy to enable color-coded output for your ......
Read more >
Unleashing the Spring Boot Gradle plugin - Tom Gregory
The fat jar gets output to build/libs/<project-name>-<project-version>.jar. bootRun task. The task graph for the bootRun task is this:.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found