2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-03-10 03:06:37 +00:00

98_DOIFtools.pm: improved logfile handling

git-svn-id: https://svn.fhem.de/fhem/trunk@13287 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
Ellert 2017-01-30 11:15:36 +00:00
parent ad63ea678e
commit 6fb7eb7a72
2 changed files with 6 additions and 2 deletions

View File

@ -1,6 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide.
# Do not insert empty lines here, update check depends on it.
- update: 98_DOIFtools.pm: add some hints
- update: 98_DOIFtools.pm: add some hints, improved logfile handling
- bugfix: 74_XiaomiFlowerSens: 0.6.3 fix blockingDone Routine
- feature: 75_MSG: support for ReplaceSetMagic; msg command may now be used
with texts containing [device:reading] to replace with

View File

@ -908,7 +908,9 @@ sub DOIFtools_Get($@)
my $pnLog = "$hash->{TYPE}Log";
push @regex, $pnLog;
readingsSingleUpdate($hash,"doif_to_log",$value,0);
return unless($value);
readingsSingleUpdate($hash,"specialLog",0,0) if (!$value);
DOIFtoolsSetNotifyDev($hash,0,1);
# return unless($value);
foreach my $i (split(",",$value)) {
push @regex, DOIFtoolsGetAssocDev($hash,$i);
@ -923,6 +925,8 @@ sub DOIFtools_Get($@)
push @ret, $ret if($ret);
$ret = CommandAttr(undef,"$pnLog nrarchive ".AttrVal($pnLog,"nrarchive","3"));
push @ret, $ret if($ret);
$ret = CommandAttr(undef,"$pnLog disable ".($value ? "0" : "1"));
push @ret, $ret if($ret);
$ret = CommandSave(undef,undef) if (AttrVal($pn,"DOIFtoolsExecuteSave",""));
push @ret, $ret if($ret);
$ret = join("\n", @ret);