Reopen log file only once after SIGHUP
authorMichael Hanselmann <hansmi@google.com>
Mon, 25 Jul 2011 11:08:22 +0000 (13:08 +0200)
committerMichael Hanselmann <hansmi@google.com>
Mon, 25 Jul 2011 13:01:44 +0000 (15:01 +0200)
commitad88650c5c298c644a6ace42d651ed229f8a023e
treec9440796a214215cc6fe37a641f0e34779a1365e
parent638ac34b0ce08a458c16310b58b17be4d07d19bf
Reopen log file only once after SIGHUP

Commit b6fa9a44 added a re-openable log handler. The log file is
reopened when a daemon is sent a HUP signal. Due to a bug in the code,
fixed by this patch, the log file would be reopened for every single log
message thereafter.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>
lib/utils/log.py
test/ganeti.utils.log_unittest.py