diff options
author | Zdenek Kabelac <zkabelac@redhat.com> | 2015-04-20 10:04:33 +0200 |
---|---|---|
committer | Zdenek Kabelac <zkabelac@redhat.com> | 2015-04-20 12:12:22 +0200 |
commit | bff3a1651d1b5b6b83a978f5896655b8df84ffc0 (patch) | |
tree | 0bc2613b5536ef3e41a52a5480b9ee88f861eff2 /daemons/dmeventd | |
parent | 5723a7cd7e857c4b5899b19060d17cac1b14e6b6 (diff) | |
download | lvm2-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.c | 3 |
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; |