Skip to content

fix(shell): enable autoFlush on console PrintStream (#2267)#2518

Merged
holgerfriedrich merged 1 commit intoapache:mainfrom
jbonofre:fix/2267-console-output-flush
Apr 14, 2026
Merged

fix(shell): enable autoFlush on console PrintStream (#2267)#2518
holgerfriedrich merged 1 commit intoapache:mainfrom
jbonofre:fix/2267-console-output-flush

Conversation

@jbonofre
Copy link
Copy Markdown
Member

@jbonofre jbonofre commented Apr 5, 2026

System.out.print() without a newline was not displayed immediately on the Karaf console because the PrintStream wrapping the terminal output was created without autoFlush. Enable autoFlush on the local console and SSH command PrintStreams, consistent with ShellFactoryImpl.

This closes #2267

@github-actions
Copy link
Copy Markdown

github-actions bot commented Apr 5, 2026

Test Results

141 files   -  93  141 suites   - 93   2m 14s ⏱️ - 20m 39s
635 tests  - 284  623 ✅  - 248  12 💤  - 36  0 ❌ ±0 
635 runs   - 288  623 ✅  - 252  12 💤  - 36  0 ❌ ±0 

Results for commit 4336469. ± Comparison against base commit 7740f7e.

This pull request removes 284 tests.
org.apache.karaf.audit.TestPerf ‑ Unknown test
org.apache.karaf.audit.logger.EventLoggerTest ‑ testFile
org.apache.karaf.audit.logger.EventLoggerTest ‑ testFileMaxFiles
org.apache.karaf.audit.logger.EventLoggerTest ‑ testFileSize
org.apache.karaf.audit.logger.EventLoggerTest ‑ testFileSizeCompress
org.apache.karaf.audit.logger.EventLoggerTest ‑ testTcp
org.apache.karaf.audit.logger.EventLoggerTest ‑ testUdp
org.apache.karaf.audit.util.FastDateFormatTest ‑ test
org.apache.karaf.audit.util.FastDateFormatTest ‑ testTimeZone
org.apache.karaf.docker.DockerClientTest ‑ testContainerLog
…

♻️ This comment has been updated with latest results.

@jbonofre jbonofre force-pushed the fix/2267-console-output-flush branch from 8119645 to 4336469 Compare April 5, 2026 17:24
Copy link
Copy Markdown
Contributor

@holgerfriedrich holgerfriedrich left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

System.out.print() without a newline was not displayed immediately on
the Karaf console because the PrintStream wrapping the terminal output
was created without autoFlush. Enable autoFlush on the local console
and SSH command PrintStreams, consistent with ShellFactoryImpl.
@jbonofre jbonofre force-pushed the fix/2267-console-output-flush branch from 4336469 to 1daee32 Compare April 13, 2026 06:49
@holgerfriedrich holgerfriedrich merged commit 99c81bc into apache:main Apr 14, 2026
10 of 12 checks passed
@jbonofre
Copy link
Copy Markdown
Member Author

@holgerfriedrich FYI, I'm creating the backport PR on karaf-4.4.x for this one.

jbonofre added a commit to jbonofre/karaf that referenced this pull request Apr 14, 2026
…ache#2518)

System.out.print() without a newline was not displayed immediately on
the Karaf console because the PrintStream wrapping the terminal output
was created without autoFlush. Enable autoFlush on the local console
and SSH command PrintStreams, consistent with ShellFactoryImpl.
jbonofre added a commit to jbonofre/karaf that referenced this pull request Apr 15, 2026
…ache#2518)

System.out.print() without a newline was not displayed immediately on
the Karaf console because the PrintStream wrapping the terminal output
was created without autoFlush. Enable autoFlush on the local console
and SSH command PrintStreams, consistent with ShellFactoryImpl.
jbonofre added a commit that referenced this pull request Apr 15, 2026
…2538)

System.out.print() without a newline was not displayed immediately on
the Karaf console because the PrintStream wrapping the terminal output
was created without autoFlush. Enable autoFlush on the local console
and SSH command PrintStreams, consistent with ShellFactoryImpl.
jbonofre added a commit to jbonofre/karaf that referenced this pull request Apr 16, 2026
…ache#2518)

System.out.print() without a newline was not displayed immediately on
the Karaf console because the PrintStream wrapping the terminal output
was created without autoFlush. Enable autoFlush on the local console
and SSH command PrintStreams, consistent with ShellFactoryImpl.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Karaf console does not show the printed message without delay

2 participants