Archiving FileLog completed

git-svn-id: https://fhem.svn.sourceforge.net/svnroot/fhem/trunk/fhem@63 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig
2007-05-27 10:54:04 +00:00
parent bd0f2d2d4c
commit 2f5fdf5c58
6 changed files with 27 additions and 5 deletions

View File

@@ -56,6 +56,7 @@ FileLog_Undef($$)
return undef;
}
# Make a directory and its parent directories if needed.
sub
HandleArchiving($)
{
@@ -118,10 +119,8 @@ FileLog_Log($$)
my $max = int(@{$dev->{CHANGED}});
for (my $i = 0; $i < $max; $i++) {
my $s = $dev->{CHANGED}[$i];
Log 1, "FL: Checking $n:$s against $re";
$s = "" if(!defined($s));
if($n =~ m/^$re$/ || "$n:$s" =~ m/^$re$/) {
Log 1, "FL: Logging";
my $t = TimeNow();
$t = $dev->{CHANGETIME}[$i] if(defined($dev->{CHANGETIME}[$i]));
$t =~ s/ /_/; # Makes it easier to parse with gnuplot