mirror of
git://sourceware.org/git/lvm2.git
synced 2024-12-30 17:18:21 +03:00
new debug class for lvmpolld client code
This commit is contained in:
parent
e213aa17bd
commit
c3d351ec9b
@ -500,10 +500,10 @@ log {
|
||||
# and only appear in debug output if the class is
|
||||
# listed here. Classes currently available:
|
||||
# memory, devices, activation, allocation,
|
||||
# lvmetad, metadata, cache, locking.
|
||||
# lvmetad, metadata, cache, locking, lvmpolld.
|
||||
# Use "all" to see everything.
|
||||
debug_classes = ["memory", "devices", "activation", "allocation",
|
||||
"lvmetad", "metadata", "cache", "locking"]
|
||||
"lvmetad", "metadata", "cache", "locking", "lvmpolld"]
|
||||
}
|
||||
|
||||
# Configuration section backup.
|
||||
|
@ -274,6 +274,8 @@ static int _parse_debug_classes(struct cmd_context *cmd)
|
||||
debug_classes |= LOG_CLASS_CACHE;
|
||||
else if (!strcasecmp(cv->v.str, "locking"))
|
||||
debug_classes |= LOG_CLASS_LOCKING;
|
||||
else if (!strcasecmp(cv->v.str, "lvmpolld"))
|
||||
debug_classes |= LOG_CLASS_LVMPOLLD;
|
||||
else
|
||||
log_verbose("Unrecognised value for log/debug_classes: %s", cv->v.str);
|
||||
}
|
||||
|
@ -546,13 +546,13 @@ cfg(log_activation_CFG, "activation", log_CFG_SECTION, 0, CFG_TYPE_BOOL, 0, vsn(
|
||||
|
||||
cfg(log_activate_file_CFG, "activate_file", log_CFG_SECTION, CFG_DEFAULT_UNDEFINED | CFG_UNSUPPORTED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, 0, NULL, NULL)
|
||||
|
||||
cfg_array(log_debug_classes_CFG, "debug_classes", log_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, "#Smemory#Sdevices#Sactivation#Sallocation#Slvmetad#Smetadata#Scache#Slocking", vsn(2, 2, 99), NULL, 0, NULL,
|
||||
cfg_array(log_debug_classes_CFG, "debug_classes", log_CFG_SECTION, CFG_ALLOW_EMPTY, CFG_TYPE_STRING, "#Smemory#Sdevices#Sactivation#Sallocation#Slvmetad#Smetadata#Scache#Slocking#Slvmpolld", vsn(2, 2, 99), NULL, 0, NULL,
|
||||
"Select log messages by class.\n"
|
||||
"Some debugging messages are assigned to a class\n"
|
||||
"and only appear in debug output if the class is\n"
|
||||
"listed here. Classes currently available:\n"
|
||||
"memory, devices, activation, allocation,\n"
|
||||
"lvmetad, metadata, cache, locking.\n"
|
||||
"lvmetad, metadata, cache, locking, lvmpolld.\n"
|
||||
"Use \"all\" to see everything.\n")
|
||||
|
||||
cfg(backup_backup_CFG, "backup", backup_CFG_SECTION, 0, CFG_TYPE_BOOL, DEFAULT_BACKUP_ENABLED, vsn(1, 0, 0), NULL, 0, NULL,
|
||||
|
@ -144,7 +144,8 @@
|
||||
|
||||
#define DEFAULT_LOGGED_DEBUG_CLASSES (LOG_CLASS_MEM | LOG_CLASS_DEVS | \
|
||||
LOG_CLASS_ACTIVATION | LOG_CLASS_ALLOC | LOG_CLASS_LVMETAD | \
|
||||
LOG_CLASS_METADATA | LOG_CLASS_CACHE | LOG_CLASS_LOCKING)
|
||||
LOG_CLASS_METADATA | LOG_CLASS_CACHE | LOG_CLASS_LOCKING | \
|
||||
LOG_CLASS_LVMPOLLD)
|
||||
|
||||
#define DEFAULT_SYSLOG 1
|
||||
#define DEFAULT_VERBOSE 0
|
||||
|
@ -67,6 +67,7 @@
|
||||
#define LOG_CLASS_METADATA 0x0020 /* "metadata" */
|
||||
#define LOG_CLASS_CACHE 0x0040 /* "cache" */
|
||||
#define LOG_CLASS_LOCKING 0x0080 /* "locking" */
|
||||
#define LOG_CLASS_LVMPOLLD 0x0100 /* "lvmpolld" */
|
||||
|
||||
#define log_debug(x...) LOG_LINE(_LOG_DEBUG, x)
|
||||
#define log_debug_mem(x...) LOG_LINE_WITH_CLASS(_LOG_DEBUG, LOG_CLASS_MEM, x)
|
||||
@ -77,6 +78,7 @@
|
||||
#define log_debug_metadata(x...) LOG_LINE_WITH_CLASS(_LOG_DEBUG, LOG_CLASS_METADATA, x)
|
||||
#define log_debug_cache(x...) LOG_LINE_WITH_CLASS(_LOG_DEBUG, LOG_CLASS_CACHE, x)
|
||||
#define log_debug_locking(x...) LOG_LINE_WITH_CLASS(_LOG_DEBUG, LOG_CLASS_LOCKING, x)
|
||||
#define log_debug_lvmpolld(x...) LOG_LINE_WITH_CLASS(_LOG_DEBUG, LOG_CLASS_LVMPOLLD, x)
|
||||
|
||||
#define log_info(x...) LOG_LINE(_LOG_INFO, x)
|
||||
#define log_notice(x...) LOG_LINE(_LOG_NOTICE, x)
|
||||
|
Loading…
Reference in New Issue
Block a user