diff --git a/includes/syslog.php b/includes/syslog.php index 827a16e557..7ab46ae7a0 100644 --- a/includes/syslog.php +++ b/includes/syslog.php @@ -53,8 +53,9 @@ function process_syslog($entry, $update) } $entry['host'] = preg_replace('/^::ffff:/', '', $entry['host']); - if ($new_host = Config::get("syslog_xlate.{$entry['host']}")) { - $entry['host'] = $new_host; + $syslog_xlate = Config::get('syslog_xlate'); + if (! empty($syslog_xlate[$entry['host']])) { + $entry['host'] = $syslog_xlate[$entry['host']]; } $entry['device_id'] = get_cache($entry['host'], 'device_id'); if ($entry['device_id']) {