logger.c: fix wrt ploop logging
There were a few problems with the way ploop logging was set up.
First, ploop.set_verbose_level() was set from g_log.level, not from
g_log.verbose.
Second, when changing quiet or verbose level, we need to call
ploop.set_verbose_level() with the appropriate arguments
(either g_log.verbose or, if quiet is set, PLOOP_LOG_NOCONSOLE).
Third, init_log() doesn't have to call ploop.set* directly, since
it is done by set_log_file(), set_log_level(), and set_log_verbose()
functions anyway. So this code is removed.
Finally, since set_log_verbose() depends on g_log.quiet value,
change the order of assignments and calls in init_log().
Hopefully, with all this ploop log is now fully and correctly controlled
by vzctl log (such as LOG_LEVEL and VERBOSE values from vz.conf(5)).
Signed-off-by: Kir Kolyshkin <kir@openvz.org>
1 file changed