Logback setup

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Logback setup

Felix Meschberger-3
Hi all

I just noted a problem in the way the logging infrastructure is configured currently with Sling Commons Log 5.0.

I have a use case, where I have the global configuration provided as properties in sling.properties. This configuration is log file name, log format pattern, and log file rotation setup. When starting up the system I see logging going to stdout until way after the system has started.

Tracking this down I see that the initial (re)configuration of the logging system happens *asynchronously* triggered by the call to the configChanged() method in the LogbackManager constructor.

Wouldn’t it be possible to have the initial (re)configuration done synchronously from the LogbackManager constructor such that when Sling Commons Log is fully started (activator terminated) the logging is configured at least according to the framework properties (which is where the sling.properties are injected) ?

Thanks
Felix
Reply | Threaded
Open this post in threaded view
|

Re: Logback setup

chetan mehrotra
On Fri, Oct 28, 2016 at 9:35 PM, Felix Meschberger <[hidden email]> wrote:
> Wouldn’t it be possible to have the initial (re)configuration done synchronously from the LogbackManager constructor such that when Sling Commons Log is fully started (activator terminated) the logging is configured at least according to the framework properties (which is where the sling.properties are injected) ?

Makes sense to make initial config setup synchronous. Can you open an
issue for the same?

Chetan Mehrotra
Reply | Threaded
Open this post in threaded view
|

Re: Logback setup

Felix Meschberger-3
Hi Chetan

Here you go: https://issues.apache.org/jira/browse/SLING-6220

Please review. Works in my environment, but … ;-)

Thanks
Felix

Am 01.11.2016 um 05:59 schrieb Chetan Mehrotra <[hidden email]<mailto:[hidden email]>>:

On Fri, Oct 28, 2016 at 9:35 PM, Felix Meschberger <[hidden email]<mailto:[hidden email]>> wrote:
Wouldn’t it be possible to have the initial (re)configuration done synchronously from the LogbackManager constructor such that when Sling Commons Log is fully started (activator terminated) the logging is configured at least according to the framework properties (which is where the sling.properties are injected) ?

Makes sense to make initial config setup synchronous. Can you open an
issue for the same?

Chetan Mehrotra