提交 a944bd92 编写于 作者: P Prasanna Kumar Kalever 提交者: Peter Krempa

qemu: conf: add option for tuning debug logging level

This helps in selecting log level of the gluster gfapi, output to stderr.
The option is 'gluster_debug_level', can be tuned by editing
'/etc/libvirt/qemu.conf'

Debug levels ranges 0-9, with 9 being the most verbose, and 0
representing no debugging output.  The default is the same as it was
before, which is a level of 4.  The current logging levels defined in
the gluster gfapi are:

    0 - None
    1 - Emergency
    2 - Alert
    3 - Critical
    4 - Error
    5 - Warning
    6 - Notice
    7 - Info
    8 - Debug
    9 - Trace
Signed-off-by: NPrasanna Kumar Kalever <prasanna.kalever@redhat.com>
Signed-off-by: NPeter Krempa <pkrempa@redhat.com>
上级 36e9b16e
......@@ -106,6 +106,8 @@ module Libvirtd_qemu =
let nvram_entry = str_array_entry "nvram"
let gluster_debug_level_entry = int_entry "gluster_debug_level"
(* Each entry in the config is one of the following ... *)
let entry = default_tls_entry
| vnc_entry
......@@ -121,6 +123,7 @@ module Libvirtd_qemu =
| network_entry
| log_entry
| nvram_entry
| gluster_debug_level_entry
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
let empty = [ label "#empty" . eol ]
......
......@@ -645,3 +645,23 @@
# rollover when a size limit is hit.
#
#stdio_handler = "logd"
# Qemu gluster libgfapi log level, debug levels are 0-9, with 9 being the
# most verbose, and 0 representing no debugging output.
#
# The current logging levels defined in the gluster GFAPI are:
#
# 0 - None
# 1 - Emergency
# 2 - Alert
# 3 - Critical
# 4 - Error
# 5 - Warning
# 6 - Notice
# 7 - Info
# 8 - Debug
# 9 - Trace
#
# Defaults to 4
#
# gluster_debug_level = 9
......@@ -311,6 +311,7 @@ virQEMUDriverConfigPtr virQEMUDriverConfigNew(bool privileged)
cfg->seccompSandbox = -1;
cfg->logTimestamp = true;
cfg->glusterDebugLevel = 4;
cfg->stdioLogD = true;
#ifdef DEFAULT_LOADER_NVRAM
......@@ -794,6 +795,8 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
goto cleanup;
}
}
if (virConfGetValueUInt(conf, "gluster_debug_level", &cfg->glusterDebugLevel) < 0)
goto cleanup;
ret = 0;
......
......@@ -192,6 +192,7 @@ struct _virQEMUDriverConfig {
virFirmwarePtr *firmwares;
size_t nfirmwares;
unsigned int glusterDebugLevel;
};
/* Main driver state */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册