View previous topic :: View next topic |
Author |
Message |
neuron Advocate
Joined: 28 May 2002 Posts: 2371
|
Posted: Fri Aug 04, 2006 1:16 am Post subject: log rotation |
|
|
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 |
|
|
wynn Advocate
Joined: 01 Apr 2005 Posts: 2421 Location: UK
|
Posted: Fri Aug 04, 2006 9:46 am Post subject: |
|
|
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 |
|
|
neuron Advocate
Joined: 28 May 2002 Posts: 2371
|
Posted: Fri Aug 04, 2006 11:26 pm Post subject: |
|
|
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 |
|
|
|
|
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
|
|