2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

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

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

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);
}