chg: [syslog] include change field if no custom log message was generated

- for certain log entries vital information was omitted by the syslog. If no custom message is specifically set for the log entry, the change field is included
pull/8568/head
iglocska 2022-08-24 09:06:11 +02:00
parent b1d5b8baff
commit 6a7521293c
No known key found for this signature in database
GPG Key ID: BEA224F1FEF113AC
1 changed files with 2 additions and 0 deletions

View File

@ -402,6 +402,8 @@ class Log extends AppModel
}
if (!empty($data['Log']['description'])) {
$entry .= " -- {$data['Log']['description']}";
} else if (!empty($data['Log']['change'])) {
$entry .= " -- " . json_encode($data['Log']['change']);
}
$this->syslog->write($action, $entry);
}