SAP / cf-java-logging-support

The Java Logging Support for Cloud Foundry supports the creation of structured log messages and the collection of request metrics
Apache License 2.0
76 stars 46 forks source link

DynLogEnvironment - Also wrap configuration with a LazyInitializer. #182

Closed j-denner closed 2 months ago

j-denner commented 2 months ago

DynLogEnvironment - Also wrap configuration with a LazyInitializer.

In the default flow, the wrapping would not be necessary. But since the DynamicLogLevelConfiguration is also exposed via protected Optional<DynamicLogLevelConfiguration> getConfiguration(), it is recreated on each invocation. (Another solution would be to remove getConfiguration(), but this is breaking API contracts)

KarstenSchnitter commented 2 months ago

@j-denner, how urgently do you need this change? I would want to include #181 and this for the next release.

j-denner commented 2 months ago

@KarstenSchnitter Whenever it fits best for you. I do not depend on this fix and provided a PR to point out/correct it. (I found it while working on a jax rs integration for logging)