logging-log4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ralph Goers <ralph.go...@dslextreme.com>
Subject Re: Snapshot logging
Date Fri, 31 Jul 2015 22:16:25 GMT
Why not just use a filter that allows the events through for some amount of time at the specified
interval?

What you are suggesting sounds like a reconfigurator component that could would reconfigure
based on the schedule (or whatever that reconfigurator wanted to use as the basis for reconfiguration).

That might be one place where allowing groovy or beanshell in the configuration would make
sense.

Ralph

> On Jul 31, 2015, at 2:00 PM, Gary Gregory <garydgregory@gmail.com> wrote:
> 
> The config could look like:
> 
> <ConfigurationSchedule>
>   <Configuration>
>      normal log4j config A
>   </Configuration> 
>   <Configuration>
>      <Schedule when="ISO 8601 period" duration="ISO 8601 duration" />
>      Alt log4j config B
>   </Configuration> 
> </ConfigurationSchedule>
> 
> Or something like that...
> 
> Gary
> 
> On Fri, Jul 31, 2015 at 1:52 PM, Gary Gregory <garydgregory@gmail.com <mailto:garydgregory@gmail.com>>
wrote:
> Thoughts for a new feature I call "Snapshot logging".
> 
> Start my app with logging set to WARN for example and a config that allows log4j to be
reconfigured on a schedule (like once every 10 minutes), run in that configuration for a given
duration, and then reconfigure itself back to its initial configuration.
> 
> The goal is to be able to see what an app is doing while I am running tests without generating
gigs and gigs of TRACE or DEBUG logging.
> 
> Thoughts?
> 
> Gary
> - 
> 
> -- 
> E-Mail: garydgregory@gmail.com <mailto:garydgregory@gmail.com> | ggregory@apache.org
 <mailto:ggregory@apache.org>
> Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> 
> Home: http://garygregory.com/ <http://garygregory.com/>
> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>
> 
> 
> -- 
> E-Mail: garydgregory@gmail.com <mailto:garydgregory@gmail.com> | ggregory@apache.org
 <mailto:ggregory@apache.org>
> Java Persistence with Hibernate, Second Edition <http://www.manning.com/bauer3/>
> JUnit in Action, Second Edition <http://www.manning.com/tahchiev/>
> Spring Batch in Action <http://www.manning.com/templier/>
> Blog: http://garygregory.wordpress.com <http://garygregory.wordpress.com/> 
> Home: http://garygregory.com/ <http://garygregory.com/>
> Tweet! http://twitter.com/GaryGregory <http://twitter.com/GaryGregory>

Mime
View raw message