<div dir="ltr">Thanks for the reply Bob. Yes, I started looking into unix's logrotate to handle this need. I worried about a mix-and-match solution, but if it's common elsewhere, so be it. Note that logback's responsibiity doesn't actually end at rotating; there's support in some of the rotate policies to do "archive removal" via the class ArchiveRemover, which appears to delete files older than X days. I'd be all set if it also supported "deleting oldest files when total size of all logs exceeds X bytes."<div><br></div><div>Thanks,</div><div>BIM</div><div><br><div class="gmail_extra"><br><div class="gmail_quote">On Mon, Dec 8, 2014 at 12:11 AM, Robert Kuhar <span dir="ltr"><<a href="mailto:robertkuhar@gmail.com" target="_blank">robertkuhar@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><p dir="ltr">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.</p><p dir="ltr"><br></p><p>Bob</p><div><div class="h5"><p dir="ltr"><br></p><p dir="ltr">On Dec 6, 2014 10:17 AM, "Don Gately" <<a href="mailto:dongatelystep13@gmail.com" target="_blank">dongatelystep13@gmail.com</a>> wrote:<br></p></div></div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div class="h5"><div dir="ltr">Hi All,<div>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:</div><div><br></div><div>1) roll over logs @ midnight each day</div><div>2) cleanup logs if size of all logs gets larger than X bytes</div><div><br></div><div>I haven't found a way to do this without writing my own RollingPolicy (and maybe TriggerPolicy, NamingPolicy, etc).</div><div><br></div><div>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)?</div><div><br></div><div>Thanks,<br>BIM</div></div>
<br></div></div>_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch" target="_blank">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br></blockquote></div>
</div>
<br>_______________________________________________<br>
Logback-user mailing list<br>
<a href="mailto:Logback-user@qos.ch">Logback-user@qos.ch</a><br>
<a href="http://mailman.qos.ch/mailman/listinfo/logback-user" target="_blank">http://mailman.qos.ch/mailman/listinfo/logback-user</a><br></blockquote></div><br></div></div></div>