You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@logging.apache.org by GitBox <gi...@apache.org> on 2021/12/22 20:25:54 UTC
[GitHub] [logging-log4j2] carterkozak opened a new pull request #650: JNDI enablement properties are loaded at most once
carterkozak opened a new pull request #650:
URL: https://github.com/apache/logging-log4j2/pull/650
Rather than checking properties after each invocation, jndi
properties are all read into static final boolean fields when
the JndiManager class is initialized, this way properties cannot
be mutated and refreshed at runtime, and checks are cheaper.
This format matches other log4j configuration points as set
in `Constants.java`.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [logging-log4j2] garydgregory commented on pull request #650: JNDI enablement properties are loaded at most once
Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #650:
URL: https://github.com/apache/logging-log4j2/pull/650#issuecomment-999846809
How is that going to work for tests that set and clear properties? You
don't want to set a property "forever"...
Gaty
On Wed, Dec 22, 2021, 15:25 Carter Kozak ***@***.***> wrote:
> Rather than checking properties after each invocation, jndi
> properties are all read into static final boolean fields when
> the JndiManager class is initialized, this way properties cannot
> be mutated and refreshed at runtime, and checks are cheaper.
> This format matches other log4j configuration points as set
> in Constants.java.
> ------------------------------
> You can view, comment on, or merge this pull request online at:
>
> https://github.com/apache/logging-log4j2/pull/650
> Commit Summary
>
> - 8b627f9
> <https://github.com/apache/logging-log4j2/pull/650/commits/8b627f97c8f4a6b29c1ff1c272394d6ed932601e>
> JNDI enablement properties are loaded at most once
>
> File Changes
>
> (1 file <https://github.com/apache/logging-log4j2/pull/650/files>)
>
> - *M*
> log4j-core/src/main/java/org/apache/logging/log4j/core/net/JndiManager.java
> <https://github.com/apache/logging-log4j2/pull/650/files#diff-271353c1076e53f6893261e4420de27d34588bfd782806b5c66a3465c43b7f51>
> (10)
>
> Patch Links:
>
> - https://github.com/apache/logging-log4j2/pull/650.patch
> - https://github.com/apache/logging-log4j2/pull/650.diff
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/logging-log4j2/pull/650>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAJB6N3QMN24IMYUIZL7A6LUSIX5LANCNFSM5KTKMN7A>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
> You are receiving this because your review was requested.Message ID:
> ***@***.***>
>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [logging-log4j2] carterkozak commented on pull request #650: JNDI enablement properties are loaded at most once
Posted by GitBox <gi...@apache.org>.
carterkozak commented on pull request #650:
URL: https://github.com/apache/logging-log4j2/pull/650#issuecomment-999870595
Local build succeeded :-)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [logging-log4j2] carterkozak commented on pull request #650: JNDI enablement properties are loaded at most once
Posted by GitBox <gi...@apache.org>.
carterkozak commented on pull request #650:
URL: https://github.com/apache/logging-log4j2/pull/650#issuecomment-999860302
> How is that going to work for tests that set and clear properties? You don't want to set a property "forever"...
Good question. I'm letting CI run our tests to see if there's anything that will need to be updated. Most of our tests rely on similar static state because binding a logging framework is itself static. Each test class (in the core project, anyhow) runs in an isolated fork, so per-test properties should be fine as long as we don't expect to change the value within a single test case. It shouldn't be any different from the tests which set properties like `log4j2.enable.threadlocals`/etc.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [logging-log4j2] garydgregory edited a comment on pull request #650: JNDI enablement properties are loaded at most once
Posted by GitBox <gi...@apache.org>.
garydgregory edited a comment on pull request #650:
URL: https://github.com/apache/logging-log4j2/pull/650#issuecomment-999846809
How is that going to work for tests that set and clear properties? You
don't want to set a property "forever"...
Gary
On Wed, Dec 22, 2021, 15:25 Carter Kozak ***@***.***> wrote:
> Rather than checking properties after each invocation, jndi
> properties are all read into static final boolean fields when
> the JndiManager class is initialized, this way properties cannot
> be mutated and refreshed at runtime, and checks are cheaper.
> This format matches other log4j configuration points as set
> in Constants.java.
> ------------------------------
> You can view, comment on, or merge this pull request online at:
>
> https://github.com/apache/logging-log4j2/pull/650
> Commit Summary
>
> - 8b627f9
> <https://github.com/apache/logging-log4j2/pull/650/commits/8b627f97c8f4a6b29c1ff1c272394d6ed932601e>
> JNDI enablement properties are loaded at most once
>
> File Changes
>
> (1 file <https://github.com/apache/logging-log4j2/pull/650/files>)
>
> - *M*
> log4j-core/src/main/java/org/apache/logging/log4j/core/net/JndiManager.java
> <https://github.com/apache/logging-log4j2/pull/650/files#diff-271353c1076e53f6893261e4420de27d34588bfd782806b5c66a3465c43b7f51>
> (10)
>
> Patch Links:
>
> - https://github.com/apache/logging-log4j2/pull/650.patch
> - https://github.com/apache/logging-log4j2/pull/650.diff
>
> —
> Reply to this email directly, view it on GitHub
> <https://github.com/apache/logging-log4j2/pull/650>, or unsubscribe
> <https://github.com/notifications/unsubscribe-auth/AAJB6N3QMN24IMYUIZL7A6LUSIX5LANCNFSM5KTKMN7A>
> .
> Triage notifications on the go with GitHub Mobile for iOS
> <https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
> or Android
> <https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub>.
>
> You are receiving this because your review was requested.Message ID:
> ***@***.***>
>
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [logging-log4j2] garydgregory commented on pull request #650: JNDI enablement properties are loaded at most once
Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #650:
URL: https://github.com/apache/logging-log4j2/pull/650#issuecomment-999870082
> > How is that going to work for tests that set and clear properties? You don't want to set a property "forever"...
>
> Good question. I'm letting CI run our tests to see if there's anything that will need to be updated. Most of our tests rely on similar static state because binding a logging framework is itself static. Each test class (in the core project, anyhow) runs in an isolated fork, so per-test properties should be fine as long as we don't expect to change the value within a single test case. It shouldn't be any different from the tests which set properties like `log4j2.enable.threadlocals`/etc.
Fingers crossed then ;-)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [logging-log4j2] garydgregory commented on pull request #650: JNDI enablement properties are loaded at most once
Posted by GitBox <gi...@apache.org>.
garydgregory commented on pull request #650:
URL: https://github.com/apache/logging-log4j2/pull/650#issuecomment-999871597
> Local build succeeded :-)
Ka-pow! :-)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [logging-log4j2] carterkozak merged pull request #650: JNDI enablement properties are loaded at most once
Posted by GitBox <gi...@apache.org>.
carterkozak merged pull request #650:
URL: https://github.com/apache/logging-log4j2/pull/650
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: notifications-unsubscribe@logging.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org