Custom actions on rollover

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Custom actions on rollover

Chandra
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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom actions on rollover

Remko Popma-2
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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom actions on rollover

Chandra
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 <[hidden email]>, 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 <[hidden email]> 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
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom actions on rollover

Ralph Goers
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 <[hidden email]> 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 <[hidden email]>, 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 <[hidden email]> 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: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom actions on rollover

Chandra
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 <[hidden email]>, 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 <[hidden email]> 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 <[hidden email]>, 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 <[hidden email]> 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: [hidden email]
> For additional commands, e-mail: [hidden email]
>
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom actions on rollover

Ralph Goers
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 <[hidden email]> 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 <[hidden email]>, 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 <[hidden email]> 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 <[hidden email]>, 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 <[hidden email]> 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: [hidden email]
>> For additional commands, e-mail: [hidden email]
>>



---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Custom actions on rollover

Remko Popma-2
In reply to this post by Chandra
On Fri, May 19, 2017 at 11:34 AM, Chandra <
[hidden email]> 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 <[hidden email]>, 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
>
Loading...