kafka-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Karthikeyan Annamalai <kannama...@owler.com>
Subject RE: log clean up
Date Fri, 02 Oct 2015 02:52:17 GMT
If its a daily rolling appender then next day when you get an another log
data will be rolled.
On Sep 26, 2015 3:20 AM, "Hema Bhatia" <Hema.Bhatia@apollo.edu> wrote:

> Thanks Gwen!
>
> I made the changes and restarted kafka nodes. Looks like all log files are
> still present. Does it take some time to kick in the changes?
>
> Here is the sample of changes:
>
> log4j.appender.stateChangeAppender=org.apache.log4j.DailyRollingFileAppender
> log4j.appender.stateChangeAppender.DatePattern='.'yyyy-MM-dd-HH
> log4j.appender.stateChangeAppender.File=${kafka.logs.dir}/state-change.log
> log4j.appender.stateChangeAppender.layout=org.apache.log4j.PatternLayout
> log4j.appender.stateChangeAppender.layout.ConversionPattern=[%d] %p %m
> (%c)%n
> log4j.appender.stateChangeAppender.MaxFileSize=100KB
> log4j.appender.stateChangeAppender.MaxBackupIndex=5
> .
> .
> log4j.appender.kafkaAppender.MaxFileSize=100KB
> log4j.appender.kafkaAppender.MaxBackupIndex=5
> .
> .
> log4j.appender.controllerAppender.MaxFileSize=100KB
> log4j.appender.controllerAppender.MaxBackupIndex=5
>
>
> -----Original Message-----
> From: Gwen Shapira [mailto:gwen@confluent.io]
> Sent: Friday, September 25, 2015 1:13 PM
> To: users@kafka.apache.org
> Subject: Re: log clean up
>
> Absolutely.
>
> You can go into config/log4j.properties and configure the appenders to
> roll the logs.
>
> For example:
>
>
> log4j.appender.stateChangeAppender=org.apache.log4j.DailyRollingFileAppender
> log4j.appender.stateChangeAppender.DatePattern='.'yyyy-MM-dd-HH
> log4j.appender.stateChangeAppender.File=${kafka.logs.dir}/state-change.log
> log4j.appender.stateChangeAppender.layout=org.apache.log4j.PatternLayout
> log4j.appender.stateChangeAppender.layout.ConversionPattern=[%d] %p %m
> (%c)%n
>
> log4j.appender.stateChangeAppender.MaxFileSize=100KB
> log4j.appender.stateChangeAppender.MaxBackupIndex=5
>
> Adding the last two lines will make sure you have 5 state change log files
> each 100KB.
>
> Gwen
>
> On Fri, Sep 25, 2015 at 11:04 AM, Hema Bhatia <Hema.Bhatia@apollo.edu>
> wrote:
>
> > Is there a way to delete kafka server, controller and state-change logs.
> > They just keep growing over time and not purged.
> >
> > -Hema
> >
> >
> >
>

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message