Skip to content

A way to disable the optimization for filling the stack traces #3638

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

Open
wants to merge 1 commit into
base: 2.x
Choose a base branch
from

Conversation

neboskreb
Copy link

@neboskreb neboskreb commented Apr 25, 2025

This PR addresses issue #3639

This PR allows to disable the optimization for filling the stack traces on platforms where it is not available (e.g. on Android).

The developer of the port to such platform shall call PrivateSecurityManagerStackTraceUtil.disable() before any loggins is printed, e.g. during the configuration phase.

For this reason, the visibility of PrivateSecurityManagerStackTraceUtil was increased to public.

Copy link

Job Requested goals Build Tool Version Build Outcome Build Scan®
build-macos-latest clean install 3.9.8 Build Scan PUBLISHED
build-ubuntu-latest clean install 3.9.8 Build Scan PUBLISHED
build-windows-latest clean install 3.9.8 Build Scan PUBLISHED
Generated by gradle/develocity-actions

Copy link
Contributor

@ppkarwasz ppkarwasz left a comment

Choose a reason for hiding this comment

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

@neboskreb,

Thank you for your contribution!

I think that PrivateSecurityManagerStackTraceUtil should always be disabled on Android. Similarly to #3071 I would simply disable the class if the java.vendor system property contains Android.

@ppkarwasz ppkarwasz moved this from To triage to Waiting for user in Log4j bug tracker Apr 25, 2025
@ppkarwasz ppkarwasz self-assigned this Apr 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Waiting for user
Development

Successfully merging this pull request may close these issues.

2 participants