Skip to content

[MNG-8334] Fix output redirection#1826

Merged
gnodet merged 11 commits intoapache:masterfrom
gnodet:MNG-8334-bis
Oct 22, 2024
Merged

[MNG-8334] Fix output redirection#1826
gnodet merged 11 commits intoapache:masterfrom
gnodet:MNG-8334-bis

Conversation

@gnodet
Copy link
Contributor

@gnodet gnodet commented Oct 20, 2024

JIRA issue: MNG-8334

  • Fix empty output when using -l or redirecting output
  • Fix incomplete log in file

Alternative PR to #1824 @cstamas, and it should fix both type of redirections (-l and shell stdout > redirection)

This PR is more in line with what I had in mind.
In particular, this would allow stuff like the multiplexed output from mvnd
where we display information to the terminal, but not the actual log output.

@cstamas
Copy link
Member

cstamas commented Oct 20, 2024

Looks good, the only strange thing is that mvn -v -l log.txt does not redirect (emit version to console). Also command mvn -v > log.txt sends ansi escapes to log file.

Copy link
Member

@cstamas cstamas left a comment

Choose a reason for hiding this comment

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

Almost all issues fixed, is good. Am also for enhancing logging (like multiplexing).

One issue (or non issue): mvn -v is NOT (yet) colored, as I see it exits so fast that Jansi (or jline) is not yet inited.

Copy link
Member

@cstamas cstamas left a comment

Choose a reason for hiding this comment

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

Last bits fixed, good to go!

@gnodet gnodet merged commit 3425b4d into apache:master Oct 22, 2024
@gnodet gnodet added this to the 4.0.0-beta-6 milestone Oct 22, 2024
@jira-importer
Copy link

Resolve #9519

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.

3 participants

Comments