From bff3a1651d1b5b6b83a978f5896655b8df84ffc0 Mon Sep 17 00:00:00 2001 From: Zdenek Kabelac Date: Mon, 20 Apr 2015 10:04:33 +0200 Subject: [PATCH] debug: use epoch for dmeventd logging When LVM_LOG_FILE_EPOCH is set, route lvm command debug message to lvm.conf log file instead of syslog. --- daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c b/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c index 80ed83aa8..9b08bbec8 100644 --- a/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c +++ b/daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c @@ -102,7 +102,8 @@ int dmeventd_lvm2_init(void) goto out; if (!_lvm_handle) { - lvm2_log_fn(_temporary_log_fn); + if (!getenv("LVM_LOG_FILE_EPOCH")) + lvm2_log_fn(_temporary_log_fn); if (!(_lvm_handle = lvm2_init())) { dm_pool_destroy(_mem_pool); _mem_pool = NULL;