From 9d8f9cdeb5d41e5aff8ed738c36464bb253bf7d1 Mon Sep 17 00:00:00 2001 From: nasseeder1 Date: Mon, 2 Sep 2019 07:17:38 +0000 Subject: [PATCH] 93_DbLog: attr global logdir is considered by set exportCache git-svn-id: https://svn.fhem.de/fhem/trunk@20093 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/93_DbLog.pm | 9 ++++----- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index d4bf808ed..96a8a1739 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -1,5 +1,6 @@ # Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # Do not insert empty lines here, update check depends on it. + - feature: 93_DbLog: attr global logdir is considered by set exportCache - change: 76_SMAInverter: STP10.0-3AV-40 298 type included - bugfix: 73_AutoShuttersControl: fix little bugs, change control logic - feature: 93_DbRep: devices contained in the selection definition are marked diff --git a/fhem/FHEM/93_DbLog.pm b/fhem/FHEM/93_DbLog.pm index 3c6a89f21..628c02a8e 100644 --- a/fhem/FHEM/93_DbLog.pm +++ b/fhem/FHEM/93_DbLog.pm @@ -30,6 +30,7 @@ no if $] >= 5.017011, warnings => 'experimental::smartmatch'; # Version History intern by DS_Starter: our %DbLog_vNotesIntern = ( + "4.5.0" => "28.08.2019 consider attr global logdir in set exportCache ", "4.4.0" => "21.08.2019 configCheck changed: check if new DbLog version is available or the local one is modified ", "4.3.0" => "14.08.2019 new attribute dbSchema, add database schema to subroutines ", "4.2.0" => "25.07.2019 DbLogValueFn as device specific function propagated in devices if dblog is used ", @@ -512,11 +513,9 @@ sub DbLog_Set($@) { my $current = $hash->{HELPER}{TC}; my (@logs,$dir); - if (!AttrVal($name,"expimpdir",undef)) { - $dir = $attr{global}{modpath}."/log/"; - } else { - $dir = AttrVal($name,"expimpdir",undef); - } + my $dirdef = AttrVal("global", "logdir", $attr{global}{modpath}."/log/"); + $dir = AttrVal($name, "expimpdir", $dirdef); + $dir = $dir."/" if($dir !~ /.*\/$/); opendir(DIR,$dir); my $sd = "cache_".$name."_";