mirror of
https://github.com/stylersnico/librenms.git
synced 2026-07-27 16:08:55 +02:00
Merge pull request #3171 from Ultra2D/syslog-trim
Syslog trim whitespace
This commit is contained in:
@@ -124,6 +124,7 @@ function process_syslog($entry, $update) {
|
||||
}
|
||||
|
||||
$entry['program'] = strtoupper($entry['program']);
|
||||
$entry = array_map('trim', $entry);
|
||||
|
||||
if ($update) {
|
||||
dbInsert(
|
||||
|
||||
@@ -137,7 +137,7 @@ class SyslogTest extends \PHPUnit_Framework_TestCase
|
||||
);
|
||||
$testdata[] = $this->createData(
|
||||
"1.1.1.1||authpriv||notice||notice||55||2016-02-28 00:23:34|| root : TTY=pts/1 ; PWD=/opt/librenms ; USER=librenms ; COMMAND=/usr/bin/git status||sudo",
|
||||
array('device_id'=>1, 'program'=>'SUDO', 'msg'=>' root : TTY=pts/1 ; PWD=/opt/librenms ; USER=librenms ; COMMAND=/usr/bin/git status')
|
||||
array('device_id'=>1, 'program'=>'SUDO', 'msg'=>'root : TTY=pts/1 ; PWD=/opt/librenms ; USER=librenms ; COMMAND=/usr/bin/git status')
|
||||
);
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user