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

- per Loglevel Attribut kann man nun einstellen ob man die Logs sehen will

oder nicht
- die Attribute clientstate* und loglevel werden nun auch nicht
weitergereicht 
(from Tobias)


git-svn-id: https://svn.fhem.de/fhem/trunk@2284 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2012-12-08 11:32:09 +00:00
parent 783126f76a
commit 9ca0724eef

View File

@ -39,7 +39,7 @@ structure_Initialize($)
$hash->{NotifyFn} = "structure_Notify";
$hash->{SetFn} = "structure_Set";
$hash->{AttrFn} = "structure_Attr";
$hash->{AttrList} = "clientstate_priority clientstate_behavior:relative,absolute";
$hash->{AttrList} = "clientstate_priority clientstate_behavior:relative,absolute loglevel:0,5";
addToAttrList("structexclude");
@ -250,7 +250,7 @@ sub structure_Notify($$)
#eigenen Status jetzt setzen, nur wenn abweichend
if(!defined($hash->{STATE}) || ($hash->{STATE} ne $newState)) {
Log 3, "Update structure '" .$me . "' to " . $newState .
Log GetLogLevel($hash->{NAME},5), "Update structure '" .$me . "' to " . $newState .
" because device '" .$dev->{NAME}. "' has changed";
$hash->{STATE} = $newState;
readingsSingleUpdate($hash, "state", $newState, 1);
@ -268,9 +268,9 @@ CommandAddStruct($)
if(int(@a) != 2) {
return "Usage: addstruct <structure_device> <devspec>";
}
my $name = shift(@a);
my $hash = $defs{$name};
if(!$hash || $hash->{TYPE} ne "structure") {
return "$a is not a structure device";
}
@ -348,7 +348,7 @@ structure_Set($@)
}
}
delete($hash->{INSET});
Log 5, "SET: $ret" if($ret);
Log GetLogLevel($hash->{NAME},5), "SET: $ret" if($ret);
return $list[1] eq "?"
? "Unknown argument ?, choose one of " . join(" ", sort keys(%pars))
: undef;
@ -361,7 +361,9 @@ structure_Attr($@)
my ($type, @list) = @_;
return undef if($list[1] eq "alias" ||
$list[1] eq "room");
$list[1] eq "room" ||
$list[1] =~ m/clientstate/ ||
$list[1] eq "loglevel");
my $hash = $defs{$list[0]};
$hash->{INATTR} = 1;
my $ret = "";
@ -384,7 +386,7 @@ structure_Attr($@)
}
}
delete($hash->{INATTR});
Log 5, "ATTR: $ret" if($ret);
Log GetLogLevel($hash->{NAME},5), "ATTR: $ret" if($ret);
return undef;
}