mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-03-04 17:36:39 +00:00
92_FileLog.pm: use ResolveDateWildcard instead of extra code (Forum #59085)
git-svn-id: https://svn.fhem.de/fhem/trunk@12362 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
0a4419c1b5
commit
c0d95e04b6
@ -606,13 +606,9 @@ FileLog_Get($@)
|
||||
$linf = $hash->{logfile};
|
||||
my ($Y,$m,$d) = ($1,$2,$3);
|
||||
sub expandFileWildcards($$$$) {
|
||||
my $f=shift;
|
||||
my ($Y,$m,$d)=@_;
|
||||
$f =~ s/%Y/$Y/g;
|
||||
$f =~ s/%m/$m/g;
|
||||
$f =~ s/%d/$d/g;
|
||||
$f =~ s/%L/$attr{global}{logdir}/g if($attr{global}{logdir});
|
||||
return($f);
|
||||
my $f=shift;
|
||||
my ($Y,$m,$d)=@_;
|
||||
return ResolveDateWildcards($f,localtime(time_str2num("$Y-$m-$d")));
|
||||
};
|
||||
$linf=expandFileWildcards($linf,$Y,$m,$d);
|
||||
if(AttrVal($name, "createGluedFile", 0)) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user