From a3421284e1f3f860eef37bb0e924e7edf4c69549 Mon Sep 17 00:00:00 2001 From: Jean Paul Galea Date: Thu, 10 Sep 2015 20:24:23 +0200 Subject: [PATCH] Refactor. --- ykval-log.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/ykval-log.php b/ykval-log.php index f6d949a..cfc05c0 100644 --- a/ykval-log.php +++ b/ykval-log.php @@ -65,15 +65,15 @@ class Log } } - $msg_fields = ''; - foreach ($this->fields as $field => $value) { - $msg_fields .= '[' . $value . '] '; - } + $fields = ''; + + foreach ($this->fields as $val) + $fields .= "[$val] "; syslog($priority, $this->log_levels[$priority] . ':' . $this->name . ':' . - $msg_fields . + $fields . $message); } }