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

Change level of initialization exception to error, make errors obvious #29078

Merged
merged 1 commit into from
Oct 26, 2023

Conversation

bvolpato
Copy link
Contributor

Exceptions in JvmInitializers were being printed in the STDOUT by the FnHarness, so handled/displayed on Dataflow as an info log:

image

This change should help making errors more obvious, and allow users to leverage Error Reporting.

I still kept e.printStackTrace(); in case there was someone relies on looking at errors on STDOUT/STDERR (happy to remove if seen as a bad practice).

@github-actions github-actions bot added the java label Oct 19, 2023
@github-actions
Copy link
Contributor

Checks are failing. Will not request review until checks are succeeding. If you'd like to override that behavior, comment assign set of reviewers

Copy link
Contributor

@Abacn Abacn left a comment

Choose a reason for hiding this comment

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

I would agree to preserve the printStackTrace line. In case log client is unavailable there is possibility that log4j logs are not get printed. Then System.out or System.err would still be useful

@bvolpato
Copy link
Contributor Author

Run Java PreCommit

@Abacn Abacn merged commit 8b8af7f into apache:master Oct 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants