]> sourceware.org Git - lvm2.git/commitdiff
new debug class for lvmpolld client code
authorOndrej Kozina <okozina@redhat.com>
Tue, 12 May 2015 13:26:26 +0000 (15:26 +0200)
committerOndrej Kozina <okozina@redhat.com>
Tue, 12 May 2015 15:16:37 +0000 (17:16 +0200)
conf/example.conf.in
lib/commands/toolcontext.c
lib/config/config_settings.h
lib/config/defaults.h
lib/log/log.h

index 843e62d798d881ee2528e1f9dc65805a3482098e..fc27a9824d4e4697d8232c8da6c7848f2fceea5f 100644 (file)
@@ -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.
index 43d878b5deb5e6b986d74d589f485c502a1fd6b0..47aa209d5841fc56d996f8e1f7d37446361711a6 100644 (file)
@@ -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);
        }
index 2bbafc3490784a8d484e7809533770e959825eeb..4fd886d4efde9c8f6c027b4f9a3da13fa17d7cb4 100644 (file)
@@ -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,
index b74566295b1c4b78cf29ec73482cecec4f7f2459..6793d01670960a704198610d30008600e5cdb59d 100644 (file)
 
 #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
index 75a62206a73425619124291dc393b2cc616e4bdc..79e7d77c5cd5bb23ed87efaf8ece00986d92c8e4 100644 (file)
@@ -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)
This page took 0.093846 seconds and 5 git commands to generate.