public inbox for gentoo-user@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-user]  [lame logrotate Q]
@ 2009-12-21  0:06 Harry Putnam
  2009-12-21  3:52 ` Dale
  0 siblings, 1 reply; 12+ messages in thread
From: Harry Putnam @ 2009-12-21  0:06 UTC (permalink / raw
  To: gentoo-user

Can anyone show me how to write a logrotate rule that will rotate on
either size or age?

I use some very simple scripting for yrs but don't really see how to
rotate on more than one condition.

I'd like to rotate a certain log weekly or over 7000k and keep no more
than 12 rotations for whatever reason.

/var/log/debug.log {
   create 0600 reader wheel
    weekly || size=7000k
    rotate 12
    postrotate
      /etc/init.d/rsyslog reload > /dev/null 2>&1 || true
    endscript
}

Is clearly NOT the right way to go.

Any know how to do it?




^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-12-26 20:01 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-12-21  0:06 [gentoo-user] [lame logrotate Q] Harry Putnam
2009-12-21  3:52 ` Dale
2009-12-21  6:42   ` Alan McKinnon
2009-12-21 16:14     ` [gentoo-user] " reader
2009-12-26 19:21       ` Mick
2009-12-21 16:48     ` [gentoo-user] Problem with old nvidia-drivers-71.86.11 (depending x11-base/xorg-server vanished form portage-tree) Christian Könitzer
2009-12-21 21:38       ` [gentoo-user] " walt
2009-12-22  9:56         ` Christian Könitzer
2009-12-21 21:40       ` [gentoo-user] " Alan McKinnon
2009-12-21 22:24         ` Dale
2009-12-22  9:55           ` Christian Könitzer
2009-12-21 22:14     ` [gentoo-user] [lame logrotate Q] Neil Bothwick

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox