From 50b1f65f6de2f0c249d8983515f248f3c6481916 Mon Sep 17 00:00:00 2001 From: rudolfkoenig <> Date: Sun, 27 May 2007 10:54:04 +0000 Subject: [PATCH] Archiving FileLog completed git-svn-id: https://svn.fhem.de/fhem/trunk@63 2b470e98-0d58-463d-a4d8-8e2adae1ed80 --- fhem/CHANGED | 1 + fhem/FHEM/92_FileLog.pm | 3 +-- fhem/HISTORY | 4 ++++ fhem/docs/commandref.html | 20 +++++++++++++++++++- fhem/fhem.pl | 2 +- fhem/test/fhem.save | 2 +- 6 files changed, 27 insertions(+), 5 deletions(-) diff --git a/fhem/CHANGED b/fhem/CHANGED index 698779944..c162a439b 100644 --- a/fhem/CHANGED +++ b/fhem/CHANGED @@ -331,3 +331,4 @@ - bugfix: disabled notify causes "uninitialized value" (STefan, 1.5) - bugfix: deleted FS20 items are still logging (zombie) (Gerhard, 16.5) - bugfix: added FS20S8, removed stty_parmrk (Martin, 24.5) + - feature: added archivedir/archivecmd to the FileLog diff --git a/fhem/FHEM/92_FileLog.pm b/fhem/FHEM/92_FileLog.pm index d4b361463..c689e78a5 100755 --- a/fhem/FHEM/92_FileLog.pm +++ b/fhem/FHEM/92_FileLog.pm @@ -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 diff --git a/fhem/HISTORY b/fhem/HISTORY index c77b9cf82..405adb917 100644 --- a/fhem/HISTORY +++ b/fhem/HISTORY @@ -94,3 +94,7 @@ reapplying all the attributes. - feature: the "-" character is disallowed in defined names. Use dot (.) or _ instead. The - is used to separate ranges in the set command. + +- Rudi, Sun May 27 12:51:52 MEST 2007 + - Archiving FileLogs. Added fhemweb.pl (pgm2) code, to show logs from the + archive directory. See the attributes archivedir/archivecmd. diff --git a/fhem/docs/commandref.html b/fhem/docs/commandref.html index e7b4f008d..27d80178f 100644 --- a/fhem/docs/commandref.html +++ b/fhem/docs/commandref.html @@ -229,6 +229,10 @@ split in multiple lines


Attributes used by all devices:
- Attributes used by selected devices: + Attributes used by some device types: