mirror of
https://github.com/fhem/fhem-mirror.git
synced 2025-05-01 20:20:10 +00:00
93_Log2Syslog: V4.8.4
git-svn-id: https://svn.fhem.de/fhem/trunk/fhem@17145 2b470e98-0d58-463d-a4d8-8e2adae1ed80
This commit is contained in:
parent
829ce3dbbf
commit
7065d11ba1
@ -507,9 +507,10 @@ sub Log2Syslog_parsePayload($$) {
|
|||||||
$tail =~ /^(?<host>[^\s]*)?\s(?<tail>.*)$/;
|
$tail =~ /^(?<host>[^\s]*)?\s(?<tail>.*)$/;
|
||||||
$host = $+{host}; # should
|
$host = $+{host}; # should
|
||||||
$tail = $+{tail};
|
$tail = $+{tail};
|
||||||
$tail =~ /^((?<id>\w*(\[?.*(?!\\\]).\])?\s?)?:)\s(?<cont>.*)$/;
|
$tail =~ /^(?<id>[\w\s]*)?(?<cont>\W.*)$/;
|
||||||
$id = $+{id}; # should
|
$id = $+{id}; # should
|
||||||
if($id) {
|
if($id) {
|
||||||
|
$id = substr($id,0, ($RFC3164len{TAG}-1)); # Länge TAG-Feld nach RFC begrenzen
|
||||||
$cont = $+{cont}; # should
|
$cont = $+{cont}; # should
|
||||||
} else {
|
} else {
|
||||||
$cont = $tail;
|
$cont = $tail;
|
||||||
@ -523,7 +524,7 @@ sub Log2Syslog_parsePayload($$) {
|
|||||||
$err = 1;
|
$err = 1;
|
||||||
Log2Syslog_Log3slog ($hash, 2, "Log2Syslog $name - error parse msg -> $data");
|
Log2Syslog_Log3slog ($hash, 2, "Log2Syslog $name - error parse msg -> $data");
|
||||||
} else {
|
} else {
|
||||||
|
$cont =~ s/^(:\s*)(.*)$/$2/;
|
||||||
if(looks_like_number($prival)) {
|
if(looks_like_number($prival)) {
|
||||||
$facility = int($prival/8) if($prival >= 0 && $prival <= 191);
|
$facility = int($prival/8) if($prival >= 0 && $prival <= 191);
|
||||||
$severity = $prival-($facility*8);
|
$severity = $prival-($facility*8);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user