Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
logrotate and 2-digit suffix
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 780

PostPosted: Mon Jul 15, 2013 10:46 am    Post subject: logrotate and 2-digit suffix Reply with quote

Is there a way to have logrotate write a 2-digit suffix to rotated files instead of 1-digit? I keep 30 rotated logs so 1-9 are out of order.
Back to top
View user's profile Send private message
cwr
Veteran
Veteran


Joined: 17 Dec 2005
Posts: 1707

PostPosted: Tue Jul 16, 2013 8:53 am    Post subject: Reply with quote

Use "logrotate start X", or a postrotate script, or a date suffix, or patch the logrotate source.

Will
Back to top
View user's profile Send private message
grant123
l33t
l33t


Joined: 23 Mar 2005
Posts: 780

PostPosted: Tue Jul 16, 2013 9:44 am    Post subject: Reply with quote

Quote:
Use "logrotate start X"

Would 'start 00' in logrotate.conf accomplish this?

Quote:
or a postrotate script

postrotate is only allowed inside a log file definition which is too much of a hassle.

Quote:
or a date suffix

I like this idea. I just added dateext and dateyesterday to logrotate.conf. I had previously decided not to do this so that webalizer would know where to look for yesterday's log file, but $(date --date=yesterday +%Y%m%d) took care of that.

Quote:
or patch the logrotate source

Over my head. :)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum