Skip to content

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

@gsartori

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    No status

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions