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-8551] Improve early error reporting #2076

Merged
merged 9 commits into from
Jan 31, 2025
Merged

Conversation

cstamas
Copy link
Member

@cstamas cstamas commented Jan 30, 2025

CLIng changes:

  • parser does not throw but signals if "parsing failed" to invoker via new flag. Invoker should "early bail out" in these cases, as it is possible that even args were not parsed.
  • logging is now fixed, in a way, that we depend on runtime configured Slf4j backend being in use. At "early stages" logger is just accumulating log entries, and logs are emitted to STDERR (in case of "early failure") or to proper Slf4j backend, once configured.
  • Parser now validates options, all those that can down the road cause error.
  • dropped ParserException and other unused bits.

In short: "early" messages go to stderr, while once logger is set up, to logger backend.


https://issues.apache.org/jira/browse/MNG-8551

@cstamas cstamas self-assigned this Jan 30, 2025
@cstamas cstamas requested a review from gnodet January 31, 2025 16:54
@cstamas cstamas marked this pull request as ready for review January 31, 2025 17:09
@cstamas cstamas added this to the 4.0.0-rc-3 milestone Jan 31, 2025
Copy link
Contributor

@gnodet gnodet left a comment

Choose a reason for hiding this comment

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

LGTM

For example "Could not create Plexus DI capsule" was useless
message, and it only masked original issue: settings could
not be built.
@cstamas cstamas merged commit b2b0bbe into apache:master Jan 31, 2025
13 checks passed
@cstamas cstamas deleted the MNG-8551 branch January 31, 2025 20:57
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