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

[LOGMGR-322] Port handler-related fixes and improvements from jboss-logmanager-embedded #378

Merged
merged 1 commit into from
May 8, 2023

Conversation

dmlloyd
Copy link
Member

@dmlloyd dmlloyd commented May 5, 2023

  • Unify sub-handler logging and error management
  • Fix encoding issue in syslog handler

…bedded`

* Unify sub-handler logging and error management
* Fix encoding issue in syslog handler
errorManager.error(msg, ex, code);
} catch (Exception ex2) {
// use the same message as the JDK
System.err.println("Handler.reportError caught:");
Copy link
Member

Choose a reason for hiding this comment

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

We should probably use the StandardOutputStreams utility here. For something like WildFly where System.out and System.err are wrapped in a logger, this could cause issues.

Copy link
Member Author

Choose a reason for hiding this comment

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

This replicates the existing JDK behavior, so in WildFly I'd expect it to be caught by the enclosing process logger. In Maven (surefire) I would expect it to be captured late as well so that it doesn't cause the dreaded "streams corrupted" error that jboss-logmanager often causes. And in any event, it's an unlikely scenario. But, it's your call.

Copy link
Member

Choose a reason for hiding this comment

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

We'll leave it for now and I'll think about how it would affect WildFly.

@jamezp jamezp merged commit 493c276 into jboss-logging:main May 8, 2023
@dmlloyd dmlloyd deleted the jle-1 branch May 8, 2023 15:46
@dmlloyd dmlloyd changed the title Port handler-related fixes and improvements from jboss-logmanager-embedded [LOGMGR-322] Port handler-related fixes and improvements from jboss-logmanager-embedded May 9, 2023
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