logger: switch to dynamic ploop lib loading

This part is a bit tricky, since we do not want to init
ploop library when we init logging. So we introduce ploop_log
flag instead to indicate if ploop lib is initialized,
and check this flag whenever we change some log settings.

Also we add a function vzctl_init_ploop_log() that sets this
flag and initializes ploop logging (basically making it in sync
with current vzctl log settings), which we call upon loading
ploop lib from load_ploop_lib().

Signed-off-by: Kir Kolyshkin <kir@openvz.org>
3 files changed