fhem.pl: resolve %L in logfiles even if logdir is not set (Forum #108865)

git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@21333 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2020-03-01 20:22:40 +00:00
parent d47296b8dc
commit 13b7405729

View File

@ -3494,7 +3494,9 @@ ResolveDateWildcards($@)
my ($f, @t) = @_;
return $f if(!$f);
return $f if($f !~ m/%/); # Be fast if there is no wildcard
$f =~ s/%L/$attr{global}{logdir}/g if($attr{global}{logdir}); #log directory
my $logdir = AttrVal("global","logdir",
AttrVal("global","modpath","")."/log");
$f =~ s/%L/$logdir/g;
return strftime($f,@t);
}