2
0
mirror of https://github.com/fhem/fhem-mirror.git synced 2025-04-19 00:26:03 +00:00

92_FileLog.pm: remove newline from the data (Forum #79684)

git-svn-id: https://svn.fhem.de/fhem/trunk@15548 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
rudolfkoenig 2017-12-03 20:01:46 +00:00
parent b079623417
commit 897e50e948
2 changed files with 4 additions and 0 deletions

View File

@ -1,5 +1,6 @@
# Add changes at the top of the list. Keep it in ASCII, and 80-char wide. # 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. # Do not insert empty lines here, update check depends on it.
- change: FileLog removes newlines from the data (Forum #79684)
- bugfix: 98_Siro.pm: Support favorit for model ERB15LE - bugfix: 98_Siro.pm: Support favorit for model ERB15LE
- feature: notify/FileLog: add ignoreRegexp attribute (Forum #79684) - feature: notify/FileLog: add ignoreRegexp attribute (Forum #79684)
- feature: 46_SmartPi: add decimal Attr, fix Notify bug - feature: 46_SmartPi: add decimal Attr, fix Notify bug

View File

@ -207,6 +207,7 @@ FileLog_Log($$)
$switched = 1; $switched = 1;
} }
$fh = $log->{FH}; $fh = $log->{FH};
$s =~ s/\n/ /g;
print $fh "$t $n $s\n"; print $fh "$t $n $s\n";
$written++; $written++;
} }
@ -274,6 +275,8 @@ FileLog_Set($@)
my $r = "Unknown argument $cmd, choose one of ".join(" ",sort keys %sets); my $r = "Unknown argument $cmd, choose one of ".join(" ",sort keys %sets);
my $fllist = join(",", grep { $me ne $_ } devspec2array("TYPE=FileLog")); my $fllist = join(",", grep { $me ne $_ } devspec2array("TYPE=FileLog"));
$r =~ s/absorb/absorb:$fllist/; $r =~ s/absorb/absorb:$fllist/;
$r =~ s/clear/clear:noArg/;
$r =~ s/reopen/reopen:noArg/;
return $r; return $r;
} }
return "$cmd needs $sets{$cmd} parameter(s)" if(@a-$sets{$cmd} != 2); return "$cmd needs $sets{$cmd} parameter(s)" if(@a-$sets{$cmd} != 2);