Skip to content

<withJansi>true</withJansi> breaks console logging after first reload in Grails 7.1.0 #15663

Closed

Description

@gsartori

In Grails 7.1.0, the default logback-spring.xml includes:

<withJansi>true</withJansi>

When this setting is enabled, console logging behaves incorrectly after the first hot-reload / recompilation event in development mode.

Observed behavior

On application startup: Logs are displayed correctly in the console

After the first code change (triggering recompilation): Only this message is shown:

File .../UserConfigService.groovy changed, recompiling...

After that point:

  • No further console logs are displayed for subsequent changes
  • The application continues running normally
  • Logging output appears effectively stuck or disabled

Expected behavior

Console logging should remain consistent across:

  • application startup
  • subsequent file changes

regardless of whether Jansi is enabled.

Steps to reproduce

  1. Create a plain Grails 7.1.0 app with default logback-spring.xml
  2. Start the application in development mode
  3. Modify a source file to trigger recompilation
  4. Observe logs during the first reload
  5. Modify another file
  6. Observe that no further logs appear in the console

Workaround

Disabling Jansi restores correct behavior:

<withJansi>false</withJansi>

or removing the setting entirely.

Notes

  • The issue appears after the first recompilation event
  • Startup logging is initially correct
  • Logging breaks only after hot reload activity begins
  • Likely interaction between Jansi ANSI console rendering and Grails dev-mode logging/reloading pipeline

Runtime

Tested on macOS and Windows 11 with Java 25

Actual Behaviour

No response

Steps To Reproduce

No response

Environment Information

No response

Example Application

No response

Version

7.1.0

Activity

  1. jdaugherty commented on May 15, 2026

    @jdaugherty
    Contributor

    Please provide an example & specify which reloading tool you are using.

  2. gsartori commented on May 15, 2026

    @gsartori
    ContributorAuthor

    Here it is, it's a newly created Greils project with forge: https://github.com/gsartori/issue-logback-with-jansi

    1. Open BootStrap.groovy
    2. Change the file
    3. Save
  3. jdaugherty commented on May 15, 2026

    @jdaugherty
    Contributor

    Thank you, from the build.gradle this is with developmentOnly "org.springframework.boot:spring-boot-devtools"

  4. gsartori commented on May 15, 2026

    @gsartori
    ContributorAuthor

    Do we have other means for reloading? I may have missed some news lately!

  5. jdaugherty commented on May 16, 2026

    @jdaugherty
    Contributor

    There is a commercial option via jrebel & the hotspot agent does work (but it's slow).

  6. added a commit that references this issue on Jun 30, 2026
    1029297
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions