[logback-user] clean up logs after N gigabytes of logs (i.e. ArchiveRemover)

Robert Kuhar robertkuhar at gmail.com
Mon Dec 8 06:11:07 CET 2014

This seems like logging infrastructure overreach, to me.  The places I've
deployed into have all just let the unix environment handle directory
cleaning.  Logback just rolls the files over daily and/or size based but
some other cron scripty thing does stuff like rm the files that are more
than a week old.  It seems that the biggest bang-for-the-buck is to let
Logback handle the logging and not much else, outsource the rest of the
work to the environment.  I guess everyone's needs may be different but the
linux environments I've been working in going on 10 years now all work
basically in this manner; Logback's responsibility ends at rollover.
Directory maintenance is the realm of system operations.


On Dec 6, 2014 10:17 AM, "Don Gately" <dongatelystep13 at gmail.com> wrote:

> Hi All,
> I recently filled up a disk with logs, and so now I'm trying to figure out
> how to ensure that I can set an upper-limit on the size of all logs in the
> directory.  I've found how to trigger file rollover @ a given size, and how
> to clean up logs after, say 3 days, but provided I'm thinking about this
> correctly, what I really want is:
> 1) roll over logs @ midnight each day
> 2) cleanup logs if size of all logs gets larger than X bytes
> I haven't found a way to do this without writing my own RollingPolicy (and
> maybe TriggerPolicy, NamingPolicy, etc).
> This seems like it would be a common goal for users, so am I missing some
> way to do this with Logback off-the-shelf (i.e. no custom code)?
> Thanks,
> _______________________________________________
> Logback-user mailing list
> Logback-user at qos.ch
> http://mailman.qos.ch/mailman/listinfo/logback-user
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.qos.ch/pipermail/logback-user/attachments/20141207/28d4e102/attachment.html>

More information about the Logback-user mailing list