You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@samza.apache.org by Shekar Tippur <ct...@gmail.com> on 2015/05/14 19:56:38 UTC

Log rotation on Samza/yarn logs

Hello,

How are the Samza/yarn logs rotated as a best practice? We seem to be
filling our disk. Should I resort to a Linux logrotate utility or is there
any log4j config we can leverage?

- Shekar

Re: Log rotation on Samza/yarn logs

Posted by Shekar Tippur <ct...@gmail.com>.
Thanks Yan.

- Shekar

On Thu, May 14, 2015 at 5:07 PM, Yi Pan <ni...@gmail.com> wrote:

> Hi, Shekar,
>
> Are you having a problem w/ retention of too many old log files on disk? I
> did a quick search online to see whether there is any configuration for
> DailyRollingFileAppender and couldn't find any. The closest thing is this
> one: http://wiki.apache.org/logging-log4j/DailyRollingFileAppender.
>
> Regards!
>
> -Yi
>
> On Thu, May 14, 2015 at 3:41 PM, Yan Fang <ya...@gmail.com> wrote:
>
> > Hi Shekar,
> >
> > Currently by default, the log4j is using DailyRollingFileAppender. You
> can
> > change the log4j.xml to config as you want. Usually, daily base is good
> > enough.
> >
> > Thanks,
> >
> > Fang, Yan
> > yanfang724@gmail.com
> >
> > On Thu, May 14, 2015 at 10:56 AM, Shekar Tippur <ct...@gmail.com>
> wrote:
> >
> > > Hello,
> > >
> > > How are the Samza/yarn logs rotated as a best practice? We seem to be
> > > filling our disk. Should I resort to a Linux logrotate utility or is
> > there
> > > any log4j config we can leverage?
> > >
> > > - Shekar
> > >
> >
>

Re: Log rotation on Samza/yarn logs

Posted by Naveen Somasundaram <ns...@linkedin.com.INVALID>.
Hey Shekar,
                   You can also use the RollingFileAppender.  You can both specify the maximum number of files and the maximum number of files you want to keep.

https://logging.apache.org/log4j/1.2/apidocs/org/apache/log4j/RollingFileAppender.html#maxBackupIndex

On May 14, 2015, at 5:07 PM, Yi Pan <ni...@gmail.com>> wrote:

Hi, Shekar,

Are you having a problem w/ retention of too many old log files on disk? I
did a quick search online to see whether there is any configuration for
DailyRollingFileAppender and couldn't find any. The closest thing is this
one: http://wiki.apache.org/logging-log4j/DailyRollingFileAppender.

Regards!

-Yi

On Thu, May 14, 2015 at 3:41 PM, Yan Fang <ya...@gmail.com>> wrote:

Hi Shekar,

Currently by default, the log4j is using DailyRollingFileAppender. You can
change the log4j.xml to config as you want. Usually, daily base is good
enough.

Thanks,

Fang, Yan
yanfang724@gmail.com<ma...@gmail.com>

On Thu, May 14, 2015 at 10:56 AM, Shekar Tippur <ct...@gmail.com> wrote:

Hello,

How are the Samza/yarn logs rotated as a best practice? We seem to be
filling our disk. Should I resort to a Linux logrotate utility or is
there
any log4j config we can leverage?

- Shekar




Re: Log rotation on Samza/yarn logs

Posted by Yi Pan <ni...@gmail.com>.
Hi, Shekar,

Are you having a problem w/ retention of too many old log files on disk? I
did a quick search online to see whether there is any configuration for
DailyRollingFileAppender and couldn't find any. The closest thing is this
one: http://wiki.apache.org/logging-log4j/DailyRollingFileAppender.

Regards!

-Yi

On Thu, May 14, 2015 at 3:41 PM, Yan Fang <ya...@gmail.com> wrote:

> Hi Shekar,
>
> Currently by default, the log4j is using DailyRollingFileAppender. You can
> change the log4j.xml to config as you want. Usually, daily base is good
> enough.
>
> Thanks,
>
> Fang, Yan
> yanfang724@gmail.com
>
> On Thu, May 14, 2015 at 10:56 AM, Shekar Tippur <ct...@gmail.com> wrote:
>
> > Hello,
> >
> > How are the Samza/yarn logs rotated as a best practice? We seem to be
> > filling our disk. Should I resort to a Linux logrotate utility or is
> there
> > any log4j config we can leverage?
> >
> > - Shekar
> >
>

Re: Log rotation on Samza/yarn logs

Posted by Yan Fang <ya...@gmail.com>.
Hi Shekar,

Currently by default, the log4j is using DailyRollingFileAppender. You can
change the log4j.xml to config as you want. Usually, daily base is good
enough.

Thanks,

Fang, Yan
yanfang724@gmail.com

On Thu, May 14, 2015 at 10:56 AM, Shekar Tippur <ct...@gmail.com> wrote:

> Hello,
>
> How are the Samza/yarn logs rotated as a best practice? We seem to be
> filling our disk. Should I resort to a Linux logrotate utility or is there
> any log4j config we can leverage?
>
> - Shekar
>