@@ 62-65 (lines=4) @@ | ||
59 | * %FACILITY-SUBFACILITY-SEVERITY-MNEMONIC: Message-text |
|
60 | */ |
|
61 | $matches = array(); |
|
62 | if(preg_match('/^(?<program>%?[A-Za-z\d\-_]+(:[A-Z]* %[A-Z\d\-_]+)?): ?(?<msg>.*)/', $entry['msg'], $matches)) { |
|
63 | $entry['program'] = $matches['program']; |
|
64 | $entry['msg'] = $matches['msg']; |
|
65 | } |
|
66 | unset($matches); |
|
67 | } |
|
68 | else { |
|
@@ 70-73 (lines=4) @@ | ||
67 | } |
|
68 | else { |
|
69 | // if this looks like a program (no groups of 2 or more lowercase letters), move it to program |
|
70 | if (!preg_match('/[(a-z)]{2,}/', $entry['msg'])) { |
|
71 | $entry['program'] = $entry['msg']; |
|
72 | unset($entry['msg']); |
|
73 | } |
|
74 | } |
|
75 | } |
|
76 | else if ($os == 'linux' and get_cache($entry['host'], 'version') == 'Point') { |
|
@@ 79-82 (lines=4) @@ | ||
76 | else if ($os == 'linux' and get_cache($entry['host'], 'version') == 'Point') { |
|
77 | // Cisco WAP200 and similar |
|
78 | $matches = array(); |
|
79 | if (preg_match('#Log: \[(?P<program>.*)\] - (?P<msg>.*)#', $entry['msg'], $matches)) { |
|
80 | $entry['msg'] = $matches['msg']; |
|
81 | $entry['program'] = $matches['program']; |
|
82 | } |
|
83 | ||
84 | unset($matches); |
|
85 | } |