You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-dev@logging.apache.org by Ralph Goers <ra...@dslextreme.com> on 2015/08/01 00:16:25 UTC

Re: Snapshot logging

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 <ga...@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 <ma...@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 <ma...@gmail.com> | ggregory@apache.org  <ma...@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 <ma...@gmail.com> | ggregory@apache.org  <ma...@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>