Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[MNG-8334] Fix output redirection #1826

Merged
merged 11 commits into from
Oct 22, 2024
Merged

[MNG-8334] Fix output redirection #1826

merged 11 commits into from
Oct 22, 2024

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
13 checks passed
@gnodet gnodet added this to the 4.0.0-beta-6 milestone Oct 22, 2024
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.

2 participants