summaryrefslogtreecommitdiff
path: root/daemons/dmeventd
diff options
context:
space:
mode:
authorZdenek Kabelac <zkabelac@redhat.com>2015-04-20 10:04:33 +0200
committerZdenek Kabelac <zkabelac@redhat.com>2015-04-20 12:12:22 +0200
commitbff3a1651d1b5b6b83a978f5896655b8df84ffc0 (patch)
tree0bc2613b5536ef3e41a52a5480b9ee88f861eff2 /daemons/dmeventd
parent5723a7cd7e857c4b5899b19060d17cac1b14e6b6 (diff)
downloadlvm2-bff3a1651d1b5b6b83a978f5896655b8df84ffc0.tar.gz
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.
Diffstat (limited to 'daemons/dmeventd')
-rw-r--r--daemons/dmeventd/plugins/lvm2/dmeventd_lvm.c3
1 files changed, 2 insertions, 1 deletions
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;