mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-01-31 12:49:34 +00:00
fhem.pl: add maxChangeLog attribute (Forum #98129)
git-svn-id: https://svn.fhem.de/fhem/trunk@18795 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
d9650cd1e7
commit
6af22e1045
@ -1585,6 +1585,14 @@ The following local attributes are used by a wider range of devices:
|
||||
<code>{ $currlogfile }</code>.
|
||||
</li><br>
|
||||
|
||||
<a name="maxChangeLog"></a>
|
||||
<li>maxChangeLog<br>
|
||||
FHEM stores the structural change history which is displayed by
|
||||
"save ?" or in FHEMWEB by clicking on the red question mark.
|
||||
By default this list is limited to 10 entries, this attribute changes
|
||||
the limit.
|
||||
</li><br>
|
||||
|
||||
<a name="maxShutdownDelay"></a>
|
||||
<li>maxShutdownDelay<br>
|
||||
Some modules need some time at shutdown to finish the cleanup, but FHEM
|
||||
|
@ -1688,6 +1688,14 @@ Die folgenden lokalen Attribute werden von mehreren Geräten verwendet:
|
||||
mit <code>{ $currlogfile }festlegen</code>.
|
||||
</li><br>
|
||||
|
||||
<a name="maxChangeLog"></a>
|
||||
<li>maxChangeLog<br>
|
||||
FHEM speichert Strukturänderungen, diese Daten kann man mit
|
||||
"save -r" oder mittels Klick auf das rote Fragezeichen in FHEMWEB
|
||||
anzeigen. Per Voreinstellung ist diese Liste auf 10 Einträge
|
||||
begrenzt, mit diesem Attribut kann man diesen Wert ändern.
|
||||
</li><br>
|
||||
|
||||
<a name="maxShutdownDelay"></a>
|
||||
<li>maxShutdownDelay<br>
|
||||
Einige Module benötigen Zeit zum Aufräumen beim shutdown,
|
||||
|
@ -341,6 +341,7 @@ my @globalAttrList = qw(
|
||||
logdir
|
||||
logfile
|
||||
longitude
|
||||
maxChangeLog
|
||||
maxShutdownDelay
|
||||
modpath
|
||||
motd
|
||||
@ -1653,7 +1654,7 @@ CommandSave($$)
|
||||
|
||||
if($param && $param eq "?") {
|
||||
return "No structural changes." if(!@structChangeHist);
|
||||
return "Last 10 structural changes:\n ".join("\n ", @structChangeHist);
|
||||
return "Last saved structural changes:\n ".join("\n ", @structChangeHist);
|
||||
}
|
||||
|
||||
if(!$cl && !AttrVal("global", "autosave", 1)) { # Forum #78769
|
||||
@ -5444,7 +5445,8 @@ addStructChange($$$)
|
||||
$lastDefChange++;
|
||||
return if($defs{$dev}{VOLATILE});
|
||||
|
||||
shift @structChangeHist if(@structChangeHist > 9);
|
||||
shift @structChangeHist
|
||||
if(@structChangeHist > AttrVal('global', 'maxChangeLog', 10) - 1);
|
||||
$param = substr($param, 0, 40)."..." if(length($param) > 40);
|
||||
push @structChangeHist, "$cmd $param";
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user