Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
log rotation
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Fri Aug 04, 2006 1:16 am    Post subject: log rotation Reply with quote

for quite a while now I've setup logrotate and configured every logfile that's big there in logrotate manually. I also occasionally have to add something to postrotate to get the application to run properly after the logs have been "emptied".

Is there any "cleaner" way to rotate logs? I have to go over logs on my server again now, as some of them are getting far too big.

Is it likely that most logging there is going through syslog, so I could use something like "remove_if_older" in syslog to handle the rotation?
Back to top
View user's profile Send private message
wynn
Advocate
Advocate


Joined: 01 Apr 2005
Posts: 2421
Location: UK

PostPosted: Fri Aug 04, 2006 9:46 am    Post subject: Reply with quote

I'm sure I'm missing something here. As far as I can see, logrotate will change the logs, compress the old log and then delete an old log when more than a configured number of old logs have collected. This is done individually for messages, access_log &c.

Quote:
I have to go over logs on my server again now, as some of them are getting far too big.
Why do you have to do this?
_________________
The avatar is jorma, a "duck" from "Elephants Dream": the film and all the production materials have been made available under a Creative Commons Attribution 2.5 License, see orange.blender.org for details.
Back to top
View user's profile Send private message
neuron
Advocate
Advocate


Joined: 28 May 2002
Posts: 2371

PostPosted: Fri Aug 04, 2006 11:26 pm    Post subject: Reply with quote

wynn wrote:
I'm sure I'm missing something here. As far as I can see, logrotate will change the logs, compress the old log and then delete an old log when more than a configured number of old logs have collected. This is done individually for messages, access_log &c.

Quote:
I have to go over logs on my server again now, as some of them are getting far too big.
Why do you have to do this?


well, if I install a new application that logs to /var/log, I have to setup logrotate for that application, figure out how to get it to keep on writing it's logs if it doesn't like logrotate etc.

And since I'm setting up multiple servers running different configurations of software, that can be a pain. It'd be much better to have one dynamic way of packing down /var/log/*.log with logrotate, and not screwing up every application logging there in the process.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security 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