Fórumok
Feltalálta-e már valaki azt a logrotate programot, ami képes arra, hogy inkrementális mentés-barát módon görgesse a logokat?
Magyarul, ne nevezze át minden görgetés alkalmával az összes logfájlt:
pistike.log.3.gz -> pistike.log.4.gz
pistike.log.2.gz -> pistike.log.3.gz
pistike.log.1.gz -> pistike.log.2.gz
... hanem mondjuk csináljon ilyet:
pistike.log.2012-12-18.gz
pistike.log.2012-12-17.gz
pistike.log.2012-12-16.gz
Hmm?
(Mivel a logrotate nem egy űrtechnológiás eszköz, ezért kb. 3 perc alatt bele lehet programozni, kérdés, hogy valaki megcsinálta-e már, nem akarom újra feltalálni a kereket)
Hozzászólások
man logrotate:
CONFIGURATION FILE
dateext
Archive old versions of log files adding a daily extension like YYYYMMDD instead of simply adding a number. The extension may be configured using the dateformat option.
dateformat format_string
Specify the extension for dateext using the notation similar to strftime(3) function. Only %Y %m %d and %s specifiers are allowed. The default value is -%Y%m%d. Note that also the character separating log name from the extension is part of the dateformat string. The system clock must be set past Sep 9th 2001 for %s to work correctly.
fasza, akkor nem logrotate replacement kell, hanem fehér bot, köszi :)
(szerk: de azért büszke vagyok magamra, hogy majdnem feltaláltam a spanyolviaszt! :) )