xenstore: add support for changing log functionality dynamically
authorJuergen Gross <jgross@suse.com>
Fri, 24 Feb 2017 06:21:43 +0000 (07:21 +0100)
committerWei Liu <wei.liu2@citrix.com>
Tue, 28 Feb 2017 10:45:30 +0000 (10:45 +0000)
commit701a21876d359ebfd61d7641923e2d92cc75e06a
tree9c66bdf63ba417e3f6d67b15cc00a32e38d77544
parent7012548e0d761bf365f17bd39cd551753eb8e652
xenstore: add support for changing log functionality dynamically

Today Xenstore supports logging only if specified at start of the
Xenstore daemon. As it can't be disabled during runtime it is not
recommended to start xenstored with logging enabled.

Add support for switching logging on and off at runtime and to
specify a (new) logfile. This is done via the XS_CONTROL wire command
which can be sent with xenstore-control.

To switch logging on just use:

xenstore-control log on

To switch it off again:

xenstore-control log off

To specify a (new) logfile:

xenstore-control logfile <file>

Signed-off-by: Juergen Gross <jgross@suse.com>
Reviewed-by: Wei Liu <wei.liu2@citrix.com>
tools/xenstore/xenstored_control.c
tools/xenstore/xenstored_core.c
tools/xenstore/xenstored_core.h