mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2024-08-27 19:11:16 +00:00
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: Prasanna Kumar Kalever <prasanna.kalever@redhat.com> Signed-off-by: Peter Krempa <pkrempa@redhat.com>
This commit is contained in:
parent
36e9b16e24
commit
a944bd9259
@ -106,6 +106,8 @@ module Libvirtd_qemu =
|
|||||||
|
|
||||||
let nvram_entry = str_array_entry "nvram"
|
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 ... *)
|
(* Each entry in the config is one of the following ... *)
|
||||||
let entry = default_tls_entry
|
let entry = default_tls_entry
|
||||||
| vnc_entry
|
| vnc_entry
|
||||||
@ -121,6 +123,7 @@ module Libvirtd_qemu =
|
|||||||
| network_entry
|
| network_entry
|
||||||
| log_entry
|
| log_entry
|
||||||
| nvram_entry
|
| nvram_entry
|
||||||
|
| gluster_debug_level_entry
|
||||||
|
|
||||||
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
|
let comment = [ label "#comment" . del /#[ \t]*/ "# " . store /([^ \t\n][^\n]*)?/ . del /\n/ "\n" ]
|
||||||
let empty = [ label "#empty" . eol ]
|
let empty = [ label "#empty" . eol ]
|
||||||
|
@ -645,3 +645,23 @@
|
|||||||
# rollover when a size limit is hit.
|
# rollover when a size limit is hit.
|
||||||
#
|
#
|
||||||
#stdio_handler = "logd"
|
#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->seccompSandbox = -1;
|
||||||
|
|
||||||
cfg->logTimestamp = true;
|
cfg->logTimestamp = true;
|
||||||
|
cfg->glusterDebugLevel = 4;
|
||||||
cfg->stdioLogD = true;
|
cfg->stdioLogD = true;
|
||||||
|
|
||||||
#ifdef DEFAULT_LOADER_NVRAM
|
#ifdef DEFAULT_LOADER_NVRAM
|
||||||
@ -794,6 +795,8 @@ int virQEMUDriverConfigLoadFile(virQEMUDriverConfigPtr cfg,
|
|||||||
goto cleanup;
|
goto cleanup;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (virConfGetValueUInt(conf, "gluster_debug_level", &cfg->glusterDebugLevel) < 0)
|
||||||
|
goto cleanup;
|
||||||
|
|
||||||
ret = 0;
|
ret = 0;
|
||||||
|
|
||||||
|
@ -192,6 +192,7 @@ struct _virQEMUDriverConfig {
|
|||||||
|
|
||||||
virFirmwarePtr *firmwares;
|
virFirmwarePtr *firmwares;
|
||||||
size_t nfirmwares;
|
size_t nfirmwares;
|
||||||
|
unsigned int glusterDebugLevel;
|
||||||
};
|
};
|
||||||
|
|
||||||
/* Main driver state */
|
/* Main driver state */
|
||||||
|
Loading…
Reference in New Issue
Block a user