mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-04-21 20:06:18 +00:00
The regexp is also tries to match timestamp:device:event
git-svn-id: https://svn.fhem.de/fhem/trunk@1774 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
579ecfd632
commit
08e624ffd6
@ -98,12 +98,13 @@ FileLog_Log($$)
|
|||||||
my $n = $dev->{NAME};
|
my $n = $dev->{NAME};
|
||||||
my $re = $log->{REGEXP};
|
my $re = $log->{REGEXP};
|
||||||
my $max = int(@{$dev->{CHANGED}});
|
my $max = int(@{$dev->{CHANGED}});
|
||||||
|
my $tn = TimeNow();
|
||||||
|
my $ct = $dev->{CHANGETIME};
|
||||||
for (my $i = 0; $i < $max; $i++) {
|
for (my $i = 0; $i < $max; $i++) {
|
||||||
my $s = $dev->{CHANGED}[$i];
|
my $s = $dev->{CHANGED}[$i];
|
||||||
$s = "" if(!defined($s));
|
$s = "" if(!defined($s));
|
||||||
if($n =~ m/^$re$/ || "$n:$s" =~ m/^$re$/) {
|
my $t = (($ct && $ct->[$i]) ? $ct->[$i] : $tn);
|
||||||
my $t = TimeNow();
|
if($n =~ m/^$re$/ || "$n:$s" =~ m/^$re$/ || "$t:$n:$s" =~ m/^$re$/) {
|
||||||
$t = $dev->{CHANGETIME}[$i] if(defined($dev->{CHANGETIME}[$i]));
|
|
||||||
$t =~ s/ /_/; # Makes it easier to parse with gnuplot
|
$t =~ s/ /_/; # Makes it easier to parse with gnuplot
|
||||||
|
|
||||||
FileLog_Switch($log);
|
FileLog_Switch($log);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user