2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-01-31 18:59:33 +00:00

92_FileLog.pm: update currentlogfile for fakelogs (Forum #42415)

git-svn-id: https://svn.fhem.de/fhem/trunk@9539 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2015-10-19 15:48:16 +00:00
parent 4b2df64792
commit 10cbbe025f

View File

@ -22,6 +22,7 @@ use vars qw(%FW_pos); # scroll position
use vars qw(%FW_webArgs); # all arguments specified in the GET
sub FileLog_seekTo($$$$$);
sub FileLog_dailySwitch($);
#####################################
sub
@ -49,9 +50,22 @@ FileLog_Initialize($)
InternalTimer(time()+0.1, sub() { # Forum #39792
map { HandleArchiving($defs{$_},1) } devspec2array("TYPE=FileLog");
FileLog_dailySwitch($hash); # Forum #42415
}, $hash, 0);
}
sub
FileLog_dailySwitch($)
{
my ($hash) = @_;
map { FileLog_Switch($defs{$_}) } devspec2array("TYPE=FileLog");
my $t = time();
$t = 86400*(int($t/86400)+1)+1-fhemTzOffset($t); # tomorrow, 1s after midnight
InternalTimer($t, "FileLog_dailySwitch", $hash, 0);
}
#####################################
sub