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 Apostolis Giannakidis <ap...@gmail.com> on 2016/01/21 11:19:19 UTC
How to properly create a RollingFileAppender with AppenderComponentBuilder
in log4j 2
Hello log4j team,
I would like your assistance please.
I am new to the log4j 2 API and am I not sure how to properly create a
RollingFileAppender with the AppenderComponentBuilder in log4j 2.
I managed to create a syslog appender using the AppenderComponentBuilder,
but as far as creating a RollingFileAppender is concerned, I find it to be
not that straightforward.
My main difficulty is that I do not know how to create a specific pattern
layout, triggering policy, and rollover strategy for the
RollingFileAppender that I want to create using the
AppenderComponentBuilder. Could you please provide a trivial example of how
this can be done?
Thank you very much for your help.
Apostolos Giannakidis
Apache Gora PMC
Re: How to properly create a RollingFileAppender with AppenderComponentBuilder in log4j 2
Posted by Ralph Goers <ra...@dslextreme.com>.
I modified the TestConfigurator unit test and posted the code to StackOverflow. I’ll add it as another example to the docs.
Ralph
> On Jan 21, 2016, at 10:04 AM, Ralph Goers <ra...@dslextreme.com> wrote:
>
> That would be the plan - except I will paste the code to stackoverflow too.
>
> Ralph
>
>> On Jan 21, 2016, at 9:46 AM, Gary Gregory <ga...@gmail.com> wrote:
>>
>> Ralph, perhaps this example should go in our docs/site and the reply can be
>> a link to it?
>>
>> Gary
>> On Jan 21, 2016 4:52 AM, "Ralph Goers" <ra...@dslextreme.com> wrote:
>>
>>> Yes, I saw your post on stackoverflow. I will build an example for you but
>>> it will take a day or two as work is very busy right now, so please be
>>> patient.
>>>
>>> Ralph
>>>
>>>> On Jan 21, 2016, at 3:19 AM, Apostolis Giannakidis <
>>> ap.giannakidis@gmail.com> wrote:
>>>>
>>>> Hello log4j team,
>>>>
>>>> I would like your assistance please.
>>>>
>>>> I am new to the log4j 2 API and am I not sure how to properly create a
>>>> RollingFileAppender with the AppenderComponentBuilder in log4j 2.
>>>>
>>>> I managed to create a syslog appender using the AppenderComponentBuilder,
>>>> but as far as creating a RollingFileAppender is concerned, I find it to
>>> be
>>>> not that straightforward.
>>>>
>>>> My main difficulty is that I do not know how to create a specific pattern
>>>> layout, triggering policy, and rollover strategy for the
>>>> RollingFileAppender that I want to create using the
>>>> AppenderComponentBuilder. Could you please provide a trivial example of
>>> how
>>>> this can be done?
>>>>
>>>> Thank you very much for your help.
>>>>
>>>> Apostolos Giannakidis
>>>> Apache Gora PMC
>>>
>>>
>>> ---------------------------------------------------------------------
>>> 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
>
>
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org
Re: How to properly create a RollingFileAppender with AppenderComponentBuilder in log4j 2
Posted by Ralph Goers <ra...@dslextreme.com>.
That would be the plan - except I will paste the code to stackoverflow too.
Ralph
> On Jan 21, 2016, at 9:46 AM, Gary Gregory <ga...@gmail.com> wrote:
>
> Ralph, perhaps this example should go in our docs/site and the reply can be
> a link to it?
>
> Gary
> On Jan 21, 2016 4:52 AM, "Ralph Goers" <ra...@dslextreme.com> wrote:
>
>> Yes, I saw your post on stackoverflow. I will build an example for you but
>> it will take a day or two as work is very busy right now, so please be
>> patient.
>>
>> Ralph
>>
>>> On Jan 21, 2016, at 3:19 AM, Apostolis Giannakidis <
>> ap.giannakidis@gmail.com> wrote:
>>>
>>> Hello log4j team,
>>>
>>> I would like your assistance please.
>>>
>>> I am new to the log4j 2 API and am I not sure how to properly create a
>>> RollingFileAppender with the AppenderComponentBuilder in log4j 2.
>>>
>>> I managed to create a syslog appender using the AppenderComponentBuilder,
>>> but as far as creating a RollingFileAppender is concerned, I find it to
>> be
>>> not that straightforward.
>>>
>>> My main difficulty is that I do not know how to create a specific pattern
>>> layout, triggering policy, and rollover strategy for the
>>> RollingFileAppender that I want to create using the
>>> AppenderComponentBuilder. Could you please provide a trivial example of
>> how
>>> this can be done?
>>>
>>> Thank you very much for your help.
>>>
>>> Apostolos Giannakidis
>>> Apache Gora PMC
>>
>>
>> ---------------------------------------------------------------------
>> 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: How to properly create a RollingFileAppender with
AppenderComponentBuilder in log4j 2
Posted by Gary Gregory <ga...@gmail.com>.
Ralph, perhaps this example should go in our docs/site and the reply can be
a link to it?
Gary
On Jan 21, 2016 4:52 AM, "Ralph Goers" <ra...@dslextreme.com> wrote:
> Yes, I saw your post on stackoverflow. I will build an example for you but
> it will take a day or two as work is very busy right now, so please be
> patient.
>
> Ralph
>
> > On Jan 21, 2016, at 3:19 AM, Apostolis Giannakidis <
> ap.giannakidis@gmail.com> wrote:
> >
> > Hello log4j team,
> >
> > I would like your assistance please.
> >
> > I am new to the log4j 2 API and am I not sure how to properly create a
> > RollingFileAppender with the AppenderComponentBuilder in log4j 2.
> >
> > I managed to create a syslog appender using the AppenderComponentBuilder,
> > but as far as creating a RollingFileAppender is concerned, I find it to
> be
> > not that straightforward.
> >
> > My main difficulty is that I do not know how to create a specific pattern
> > layout, triggering policy, and rollover strategy for the
> > RollingFileAppender that I want to create using the
> > AppenderComponentBuilder. Could you please provide a trivial example of
> how
> > this can be done?
> >
> > Thank you very much for your help.
> >
> > Apostolos Giannakidis
> > Apache Gora PMC
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
Re: How to properly create a RollingFileAppender with
AppenderComponentBuilder in log4j 2
Posted by Apostolis Giannakidis <ap...@gmail.com>.
Thank you for the reply Ralph and for your effort. I look forward to your
reply.
On Thu, Jan 21, 2016 at 12:51 PM, Ralph Goers <ra...@dslextreme.com>
wrote:
> Yes, I saw your post on stackoverflow. I will build an example for you but
> it will take a day or two as work is very busy right now, so please be
> patient.
>
> Ralph
>
> > On Jan 21, 2016, at 3:19 AM, Apostolis Giannakidis <
> ap.giannakidis@gmail.com> wrote:
> >
> > Hello log4j team,
> >
> > I would like your assistance please.
> >
> > I am new to the log4j 2 API and am I not sure how to properly create a
> > RollingFileAppender with the AppenderComponentBuilder in log4j 2.
> >
> > I managed to create a syslog appender using the AppenderComponentBuilder,
> > but as far as creating a RollingFileAppender is concerned, I find it to
> be
> > not that straightforward.
> >
> > My main difficulty is that I do not know how to create a specific pattern
> > layout, triggering policy, and rollover strategy for the
> > RollingFileAppender that I want to create using the
> > AppenderComponentBuilder. Could you please provide a trivial example of
> how
> > this can be done?
> >
> > Thank you very much for your help.
> >
> > Apostolos Giannakidis
> > Apache Gora PMC
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
> For additional commands, e-mail: log4j-user-help@logging.apache.org
>
>
Re: How to properly create a RollingFileAppender with AppenderComponentBuilder in log4j 2
Posted by Ralph Goers <ra...@dslextreme.com>.
Yes, I saw your post on stackoverflow. I will build an example for you but it will take a day or two as work is very busy right now, so please be patient.
Ralph
> On Jan 21, 2016, at 3:19 AM, Apostolis Giannakidis <ap...@gmail.com> wrote:
>
> Hello log4j team,
>
> I would like your assistance please.
>
> I am new to the log4j 2 API and am I not sure how to properly create a
> RollingFileAppender with the AppenderComponentBuilder in log4j 2.
>
> I managed to create a syslog appender using the AppenderComponentBuilder,
> but as far as creating a RollingFileAppender is concerned, I find it to be
> not that straightforward.
>
> My main difficulty is that I do not know how to create a specific pattern
> layout, triggering policy, and rollover strategy for the
> RollingFileAppender that I want to create using the
> AppenderComponentBuilder. Could you please provide a trivial example of how
> this can be done?
>
> Thank you very much for your help.
>
> Apostolos Giannakidis
> Apache Gora PMC
---------------------------------------------------------------------
To unsubscribe, e-mail: log4j-user-unsubscribe@logging.apache.org
For additional commands, e-mail: log4j-user-help@logging.apache.org