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

Prevent log4j2.isWebapp from overriding other constants #2517

Merged
merged 5 commits into from Apr 26, 2024

Conversation

ppkarwasz
Copy link
Contributor

Currently, if log4j2.isWebapp is enabled, the effective values of the following system properties:

  • log4j2.enableThreadlocals,
  • log4j2.garbagefreeThreadLocalMap,
  • log4j2.shutdownHookEnabled.

is set to false.

After this PR:

  • the above mentioned constants are set to the value explicitly set by the user,
  • if the user didn't provide any value !log4j2.isWebapp is used.

Currently, if `log4j2.isWebapp` is enabled, the effective values of the
following system properties:

* `log4j2.enableThreadlocals`,
* `log4j2.garbagefreeThreadLocalMap`,
* `log4j2.shutdownHookEnabled`.

is set to `false`.

After this PR:

* the above mentioned constants are set to the value **explicitly** set
  by the user,
* if the user didn't provide any value `!log4j2.isWebapp` is used.
@ppkarwasz ppkarwasz force-pushed the feature/2.x/change-is-webapp branch from b21ce87 to 644b629 Compare April 25, 2024 12:18
@ppkarwasz ppkarwasz merged commit 6e7e345 into 2.x Apr 26, 2024
9 checks passed
@ppkarwasz ppkarwasz deleted the feature/2.x/change-is-webapp branch April 26, 2024 20:05
@ppkarwasz ppkarwasz mentioned this pull request Apr 30, 2024
3 tasks
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.

None yet

2 participants