summaryrefslogtreecommitdiff
path: root/lib/config
diff options
context:
space:
mode:
authorDavid Teigland <teigland@redhat.com>2021-03-24 14:19:54 -0500
committerDavid Teigland <teigland@redhat.com>2021-10-07 12:06:49 -0500
commitbbf8e7db74d744c1462a63ae2bc64f4d46e8db9f (patch)
tree8c6fa78932f81af6a46ea7eb9f0afad9654d4730 /lib/config
parent0b6782fa0139e412f827cc9d1f0cd96ea38e27b0 (diff)
downloadlvm2-bbf8e7db74d744c1462a63ae2bc64f4d46e8db9f.tar.gz
logging: to the systemd journal
Configure via lvm.conf log/journal or command line --journal. Possible values: "command" records command information. "output" records default command output. "debug" records full command debugging. Multiple values can be set in lvm.conf as an array. One value can be set in --journal which is added to values set in lvm.conf
Diffstat (limited to 'lib/config')
-rw-r--r--lib/config/config_settings.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/config/config_settings.h b/lib/config/config_settings.h
index aad0d5989..d280e7adb 100644
--- a/lib/config/config_settings.h
+++ b/lib/config/config_settings.h
@@ -873,6 +873,12 @@ cfg(log_syslog_CFG, "syslog", log_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_B
cfg(log_file_CFG, "file", log_CFG_SECTION, CFG_DEFAULT_UNDEFINED, CFG_TYPE_STRING, NULL, vsn(1, 0, 0), NULL, 0, NULL,
"Write error and debug log messages to a file specified here.\n")
+cfg_array(log_journal_CFG, "journal", log_CFG_SECTION, CFG_ALLOW_EMPTY | CFG_DEFAULT_COMMENTED, CFG_TYPE_STRING, NULL, vsn(2, 3, 12), NULL, 0, NULL,
+ "Record lvm information in the systemd journal.\n"
+ "command: record commands that are run.\n"
+ "output: record default output from commands.\n"
+ "debug: record debug messages from commands.\n")
+
cfg(log_overwrite_CFG, "overwrite", log_CFG_SECTION, CFG_DEFAULT_COMMENTED, CFG_TYPE_BOOL, DEFAULT_OVERWRITE, vsn(1, 0, 0), NULL, 0, NULL,
"Overwrite the log file each time the program is run.\n")