mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-27 10:37:13 +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:
parent
4b2df64792
commit
10cbbe025f
@ -22,6 +22,7 @@ use vars qw(%FW_pos); # scroll position
|
|||||||
use vars qw(%FW_webArgs); # all arguments specified in the GET
|
use vars qw(%FW_webArgs); # all arguments specified in the GET
|
||||||
|
|
||||||
sub FileLog_seekTo($$$$$);
|
sub FileLog_seekTo($$$$$);
|
||||||
|
sub FileLog_dailySwitch($);
|
||||||
|
|
||||||
#####################################
|
#####################################
|
||||||
sub
|
sub
|
||||||
@ -49,9 +50,22 @@ FileLog_Initialize($)
|
|||||||
|
|
||||||
InternalTimer(time()+0.1, sub() { # Forum #39792
|
InternalTimer(time()+0.1, sub() { # Forum #39792
|
||||||
map { HandleArchiving($defs{$_},1) } devspec2array("TYPE=FileLog");
|
map { HandleArchiving($defs{$_},1) } devspec2array("TYPE=FileLog");
|
||||||
|
FileLog_dailySwitch($hash); # Forum #42415
|
||||||
}, $hash, 0);
|
}, $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
|
sub
|
||||||
|
Loading…
x
Reference in New Issue
Block a user