Introduce re-openable log record handler
authorMichael Hanselmann <hansmi@google.com>
Mon, 31 Jan 2011 12:52:39 +0000 (13:52 +0100)
committerMichael Hanselmann <hansmi@google.com>
Mon, 31 Jan 2011 12:53:18 +0000 (13:53 +0100)
commitb6fa9a44267d5cf292a81d2c0b98e0f5f13141f6
tree157935ada7b540444c17f56fdcdfc288176a2217
parentc417e1152c3b9ff59ea2091df6b30d1b75371c36
Introduce re-openable log record handler

This patch adds a new log handler class based on the standard library's
BaseRotatingHandler. This new class allows the log file to be re-opened,
e.g. upon receiving a SIGHUP signal. The latter will be implemented in
forthcoming patches. The patch does not change the behaviour regarding
writing to /dev/console.

Quite a bit of code had to be changed to unittest the log handlers.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
Makefile.am
lib/utils/log.py
test/ganeti.utils.log_unittest.py [new file with mode: 0755]