[patch] Add logrotate support

Mark McLoughlin markmc at redhat.com
Fri Jul 8 09:07:30 UTC 2011


Hey,

On Thu, 2011-07-07 at 22:34 -0600, Pete Zaitcev wrote:
> Logfile of iwhd grows quite quickly, especially if someone adds -v.
> I saw 100 GB log at one of test machines. We need to rotate them.
> For that, the daemon has to be able to reopen the log, which is not
> possible if it simply dumps everything to standard error. An ideal
> ipproach would be to have all messages printed through a logging
> facility. However, that requires a lot of patching, and there is a
> question of what to do with library output (if any). This patch
> offers a stop-gap solution, where we add a log rotation facility
> of our own standard error.

I haven't reviewed in detail, but it looks like a good approach to me.

I've take a quick stab at a logging facility which could go in after
your patch and we could gradually switch over all the log messages that
we control to use it:

  https://github.com/markmc/iwhd/commit/44c26d5800

Cheers,
Mark.



More information about the iwhd-devel mailing list