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

JUL EcsFormatter boolean parameter values are ignored #133

Closed
odonati-fr opened this issue Jul 1, 2021 · 1 comment · Fixed by #182
Closed

JUL EcsFormatter boolean parameter values are ignored #133

odonati-fr opened this issue Jul 1, 2021 · 1 comment · Fixed by #182
Labels
agent-java bug Something isn't working community Issues and PRs created by the community

Comments

@odonati-fr
Copy link

The boolean parameters values (in co.elastic.logging.jul.EcsFormatter's constructor) are loaded using java method Boolean.getBoolean(property) instead of Boolean.parseBoolean(string).

So if logging.properties contains:
co.elastic.logging.jul.EcsFormatter.stackTraceAsArray=true
the formatter property stackTraceAsArray will be true only if a system property named "true" with value "true" exists.

It's a workaround but I don't think it was intended that way.

@AlexanderWert AlexanderWert added agent-java community Issues and PRs created by the community labels Oct 11, 2021
@felixbarny felixbarny added the bug Something isn't working label Feb 14, 2022
@eyalkoren
Copy link
Contributor

Sorry for the very long wait, we've been very busy 😄

It's a workaround but I don't think it was intended that way.

Definitely not intended this way.

A test for stack-as-array would uncover that.
Once #177 is merged, I may include a general test within the fix for this issue.

Thanks for reporting!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
agent-java bug Something isn't working community Issues and PRs created by the community
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants