You are viewing a plain text version of this content. The canonical link for it is here.
Posted to log4j-user@logging.apache.org by Chandra <ch...@rwth-aachen.de> on 2017/05/18 13:38:08 UTC

Custom actions on rollover

Hi guys,

So my requirement is to log the file names of the log files at the time of rotation. I came across the `Actions` PluginElement in DefaultRolloverStrategy.
Can this be used for the purpose. I haven’t worked on it and it seems there aren’t many good resources for this. Anyone worked on the creating custom actions in Rollover strategy.


thanks,
Chandra

Re: Custom actions on rollover

Posted by Remko Popma <re...@gmail.com>.
On Fri, May 19, 2017 at 11:34 AM, Chandra <
chandra.tungathurthi@rwth-aachen.de> wrote:

> PS: btw, “picocli” looks like a good candidate to be used in “jvmTop (
> https://github.com/tckb/jvmtop)”  the original project used “jOpt”
>
>  Great idea! Looks like a good fit. Let me know if you need help.


>
> On 19 May 2017, 5:25 AM +0530, Remko Popma <re...@gmail.com>, wrote:
> > Some (very early stage) thinking on that topic is here:
> https://issues.apache.org/jira/browse/LOG4J2-1198
> >
> > This may not be easy because there are quite a few subtleties with
> rollovers (search the Log4j2 JIRA for rolling and rollover).
> >
> > Remko
> >
> > (Shameless plug) Every java main() method deserves http://picocli.info
> >
> > > On May 18, 2017, at 22:38, Chandra <chandra.tungathurthi@rwth-
> aachen.de> wrote:
> > >
> > > Hi guys,
> > >
> > > So my requirement is to log the file names of the log files at the
> time of rotation. I came across the `Actions` PluginElement in
> DefaultRolloverStrategy.
> > > Can this be used for the purpose. I haven’t worked on it and it seems
> there aren’t many good resources for this. Anyone worked on the creating
> custom actions in Rollover strategy.
> > >
> > >
> > > thanks,
> > > Chandra
>

Re: Custom actions on rollover

Posted by Ralph Goers <ra...@dslextreme.com>.
The best advice I can give you is to look at the existing actions in Log4j-core.

Ralph

> On May 18, 2017, at 10:21 PM, Chandra <ch...@rwth-aachen.de> wrote:
> 
> Hey Ralph,
> 
> I want to write a custom action as I see it’s not available. I am just looking for some place to start.
> that’s why I asked some kind of doc/overview of the framework that would quickly get me started.
> 
> 
> 
> thanks,
> Chandra
> 
> On 19 May 2017, 10:29 AM +0530, Ralph Goers <ra...@dslextreme.com>, wrote:
>> I just updated the stack overflow article Remko mentioned to document the improvements that were made in 2.8. That still doesn’t solve your problem, but I don’t see why you couldn’t write a custom action. If we can write an action to delete the files I don’t see why one couldn’t log the names of the files.
>> 
>> Ralph
>> 
>>> On May 18, 2017, at 7:34 PM, Chandra <ch...@rwth-aachen.de> wrote:
>>> 
>>> Hi Remko, I see it, the more I dig in the “rollover” strategy, the more I discover of these “subtleties”.
>>> is there by any chance a bird’s eye view of the framework?
>>> 
>>> 
>>> thanks,
>>> Chandra
>>> —
>>> PS: btw, “picocli” looks like a good candidate to be used in “jvmTop (https://github.com/tckb/jvmtop)” the original project used “jOpt”
>>> 
>>> 
>>> 
>>> On 19 May 2017, 5:25 AM +0530, Remko Popma <re...@gmail.com>, wrote:
>>>> Some (very early stage) thinking on that topic is here: https://issues.apache.org/jira/browse/LOG4J2-1198
>>>> 
>>>> This may not be easy because there are quite a few subtleties with rollovers (search the Log4j2 JIRA for rolling and rollover).
>>>> 
>>>> Remko
>>>> 
>>>> (Shameless plug) Every java main() method deserves http://picocli.info
>>>> 
>>>>> On May 18, 2017, at 22:38, Chandra <ch...@rwth-aachen.de> wrote:
>>>>> 
>>>>> Hi guys,
>>>>> 
>>>>> So my requirement is to log the file names of the log files at the time of rotation. I came across the `Actions` PluginElement in DefaultRolloverStrategy.
>>>>> Can this be used for the purpose. I haven’t worked on it and it seems there aren’t many good resources for this. Anyone worked on the creating custom actions in Rollover strategy.
>>>>> 
>>>>> 
>>>>> thanks,
>>>>> Chandra
>> 
>> 
>> 
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
>> For additional commands, e-mail: log4j-user-help@logging.apache.org
>> 



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Custom actions on rollover

Posted by Chandra <ch...@rwth-aachen.de>.
Hey Ralph,

I want to write a custom action as I see it’s not available. I am just looking for some place to start.
that’s why I asked some kind of doc/overview of the framework that would quickly get me started.



thanks,
Chandra

On 19 May 2017, 10:29 AM +0530, Ralph Goers <ra...@dslextreme.com>, wrote:
> I just updated the stack overflow article Remko mentioned to document the improvements that were made in 2.8. That still doesn’t solve your problem, but I don’t see why you couldn’t write a custom action. If we can write an action to delete the files I don’t see why one couldn’t log the names of the files.
>
> Ralph
>
> > On May 18, 2017, at 7:34 PM, Chandra <ch...@rwth-aachen.de> wrote:
> >
> > Hi Remko, I see it, the more I dig in the “rollover” strategy, the more I discover of these “subtleties”.
> > is there by any chance a bird’s eye view of the framework?
> >
> >
> > thanks,
> > Chandra
> > —
> > PS: btw, “picocli” looks like a good candidate to be used in “jvmTop (https://github.com/tckb/jvmtop)” the original project used “jOpt”
> >
> >
> >
> > On 19 May 2017, 5:25 AM +0530, Remko Popma <re...@gmail.com>, wrote:
> > > Some (very early stage) thinking on that topic is here: https://issues.apache.org/jira/browse/LOG4J2-1198
> > >
> > > This may not be easy because there are quite a few subtleties with rollovers (search the Log4j2 JIRA for rolling and rollover).
> > >
> > > Remko
> > >
> > > (Shameless plug) Every java main() method deserves http://picocli.info
> > >
> > > > On May 18, 2017, at 22:38, Chandra <ch...@rwth-aachen.de> wrote:
> > > >
> > > > Hi guys,
> > > >
> > > > So my requirement is to log the file names of the log files at the time of rotation. I came across the `Actions` PluginElement in DefaultRolloverStrategy.
> > > > Can this be used for the purpose. I haven’t worked on it and it seems there aren’t many good resources for this. Anyone worked on the creating custom actions in Rollover strategy.
> > > >
> > > >
> > > > thanks,
> > > > Chandra
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>

Re: Custom actions on rollover

Posted by Ralph Goers <ra...@dslextreme.com>.
I just updated the stack overflow article Remko mentioned to document the improvements that were made in 2.8. That still doesn’t solve your problem, but I don’t see why you couldn’t write a custom action. If we can write an action to delete the files I don’t see why one couldn’t log the names of the files.

Ralph

> On May 18, 2017, at 7:34 PM, Chandra <ch...@rwth-aachen.de> wrote:
> 
> Hi Remko, I see it, the more I dig in the “rollover” strategy, the more I  discover of these “subtleties”.
> is there by any chance a bird’s eye view of the framework?
> 
> 
> thanks,
> Chandra
> —
> PS: btw, “picocli” looks like a good candidate to be used in “jvmTop (https://github.com/tckb/jvmtop)”  the original project used “jOpt”
> 
> 
> 
> On 19 May 2017, 5:25 AM +0530, Remko Popma <re...@gmail.com>, wrote:
>> Some (very early stage) thinking on that topic is here: https://issues.apache.org/jira/browse/LOG4J2-1198
>> 
>> This may not be easy because there are quite a few subtleties with rollovers (search the Log4j2 JIRA for rolling and rollover).
>> 
>> Remko
>> 
>> (Shameless plug) Every java main() method deserves http://picocli.info
>> 
>>> On May 18, 2017, at 22:38, Chandra <ch...@rwth-aachen.de> wrote:
>>> 
>>> Hi guys,
>>> 
>>> So my requirement is to log the file names of the log files at the time of rotation. I came across the `Actions` PluginElement in DefaultRolloverStrategy.
>>> Can this be used for the purpose. I haven’t worked on it and it seems there aren’t many good resources for this. Anyone worked on the creating custom actions in Rollover strategy.
>>> 
>>> 
>>> thanks,
>>> Chandra



---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org


Re: Custom actions on rollover

Posted by Chandra <ch...@rwth-aachen.de>.
Hi Remko, I see it, the more I dig in the “rollover” strategy, the more I  discover of these “subtleties”.
is there by any chance a bird’s eye view of the framework?


thanks,
Chandra
—
PS: btw, “picocli” looks like a good candidate to be used in “jvmTop (https://github.com/tckb/jvmtop)”  the original project used “jOpt”



On 19 May 2017, 5:25 AM +0530, Remko Popma <re...@gmail.com>, wrote:
> Some (very early stage) thinking on that topic is here: https://issues.apache.org/jira/browse/LOG4J2-1198
>
> This may not be easy because there are quite a few subtleties with rollovers (search the Log4j2 JIRA for rolling and rollover).
>
> Remko
>
> (Shameless plug) Every java main() method deserves http://picocli.info
>
> > On May 18, 2017, at 22:38, Chandra <ch...@rwth-aachen.de> wrote:
> >
> > Hi guys,
> >
> > So my requirement is to log the file names of the log files at the time of rotation. I came across the `Actions` PluginElement in DefaultRolloverStrategy.
> > Can this be used for the purpose. I haven’t worked on it and it seems there aren’t many good resources for this. Anyone worked on the creating custom actions in Rollover strategy.
> >
> >
> > thanks,
> > Chandra

Re: Custom actions on rollover

Posted by Remko Popma <re...@gmail.com>.
Some (very early stage) thinking on that topic is here: https://issues.apache.org/jira/browse/LOG4J2-1198

This may not be easy because there are quite a few subtleties with rollovers (search the Log4j2 JIRA for rolling and rollover). 

Remko 

(Shameless plug) Every java main() method deserves http://picocli.info

> On May 18, 2017, at 22:38, Chandra <ch...@rwth-aachen.de> wrote:
> 
> Hi guys,
> 
> So my requirement is to log the file names of the log files at the time of rotation. I came across the `Actions` PluginElement in DefaultRolloverStrategy.
> Can this be used for the purpose. I haven’t worked on it and it seems there aren’t many good resources for this. Anyone worked on the creating custom actions in Rollover strategy.
> 
> 
> thanks,
> Chandra