Never used the gz part. So don't know how it works. Another way is to just use the regular rolling file appender and have a background process to compress the rolled logs.
Thanks, Jun On Thu, Dec 19, 2013 at 1:44 AM, Nishant Kumar <nish.a...@gmail.com> wrote: > Thanks Jun, > > Thanks Jun for your quick reply. But i am still not able to make archive > files in kafka/log folder. > > I am using following properties in kafka/config/log4j.properties file > > log4j.appender.requestAppender=org.apache.log4j.RollingFileAppender > log4j.appender.requestAppender.policy= > org.apache.log4j.rolling.SizeBasedTriggeringPolicy > log4j.appender.requestAppender.policy.MaxFileSize=1MB > log4j.appender.requestAppender.File=logs/kafka-request.log > > log4j.appender.requestAppender.policy.filePattern="logs/$${date:yyyy-MM}/kafka-request%d{MM-dd-yyyy}-%i.log.gz > > log4j.appender.requestAppender.layout=org.apache.log4j.PatternLayout > log4j.appender.requestAppender.layout.ConversionPattern=[%d] %p %m (%c)%n > > > > Is there anything which i am missing? > > Regards, > Nishant Kumar > > > On Wed, Dec 18, 2013 at 9:51 PM, Jun Rao <jun...@gmail.com> wrote: > > > Take a look at > > > > > http://logging.apache.org/log4j/2.x/manual/appenders.html#RollingFileAppenderand > > search for compress. > > > > Thanks, > > > > Jun > > > > > > On Tue, Dec 17, 2013 at 11:58 PM, Nishant Kumar <nish.a...@gmail.com> > > wrote: > > > > > Hello All, > > > > > > I am using kafka 0.8. > > > I want to archive my kafka-request.log, server.log, controller.log, > > > staet-change.log. > > > > > > Is there any property in log4j by which i can archive my logs in zip > > > folders or files. > > > > > > Please suggest. > > > > > > Regards, > > > Nishant Kumar > > > > > >