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

Use SLF4J, avoid interfering with application logging #15

Merged
merged 1 commit into from
Nov 30, 2023

Conversation

ebaron
Copy link
Collaborator

@ebaron ebaron commented Nov 27, 2023

When testing with EAP, we found a conflict with our JUL logging and EAP's logging that prevented it from starting. This PR ports over the logging setup from https://github.com/cryostatio/cryostat-agent that avoids this problem using an SLF4J configuration that avoids conflicts with the host application's logging.

This implementation was originally done by @andrewazores

Copy link
Member

@andrewazores andrewazores left a comment

Choose a reason for hiding this comment

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

Looks like it matches the cryostat-agent workaround.

@ebaron ebaron marked this pull request as draft November 27, 2023 22:28
@ebaron
Copy link
Collaborator Author

ebaron commented Nov 27, 2023

We're seeing similar errors with EAP in Cryostat on OpenShift, converting this to a draft until we've figured it out.

@ehsavoie
Copy link
Contributor

ehsavoie commented Nov 29, 2023

You should use MODULE_OPTS instead of JAVA_OPTS to pass your agent thus you would avoid that logmanager issue

@ebaron
Copy link
Collaborator Author

ebaron commented Nov 30, 2023

We're seeing similar errors with EAP in Cryostat on OpenShift, converting this to a draft until we've figured it out.

This turned out to be due to a separate issue where the same crash occurs by enabling remote JMX (with or without an agent): https://access.redhat.com/solutions/312453

You should use MODULE_OPTS instead of JAVA_OPTS to pass your agent thus you would avoid that logmanager issue

I tried this and it works well for EAP 7.4.0+, but this could still help to simplify installing our agent with older versions of EAP.

@ebaron ebaron marked this pull request as ready for review November 30, 2023 14:48
Copy link
Collaborator

@kittylyst kittylyst left a comment

Choose a reason for hiding this comment

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

LGTM.

@kittylyst kittylyst merged commit 4f9b941 into RedHatInsights:main Nov 30, 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.

4 participants