X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FSystemLogger.php;h=64105889414032cccc0541d1c39ca96f25679800;hb=850d8c7cf555cdb11176418b2d1ecd035eddcb14;hp=ac81bc8d9adc8a3bb1ebd2133c920eb9730f311e;hpb=b344fd6552d12c5ae345fd52bf4f4f03475c047b;p=civicrm-core.git diff --git a/CRM/Utils/SystemLogger.php b/CRM/Utils/SystemLogger.php index ac81bc8d9a..6410588941 100644 --- a/CRM/Utils/SystemLogger.php +++ b/CRM/Utils/SystemLogger.php @@ -3,7 +3,7 @@ +--------------------------------------------------------------------+ | CiviCRM version 5 | +--------------------------------------------------------------------+ - | Copyright CiviCRM LLC (c) 2004-2018 | + | Copyright CiviCRM LLC (c) 2004-2019 | +--------------------------------------------------------------------+ | This file is a part of CiviCRM. | | | @@ -28,9 +28,10 @@ /** * * @package CRM - * @copyright CiviCRM LLC (c) 2004-2018 + * @copyright CiviCRM LLC (c) 2004-2019 */ class CRM_Utils_SystemLogger extends Psr\Log\AbstractLogger implements \Psr\Log\LoggerInterface { + /** * Logs with an arbitrary level. * @@ -38,12 +39,12 @@ class CRM_Utils_SystemLogger extends Psr\Log\AbstractLogger implements \Psr\Log\ * @param string $message * @param array $context */ - public function log($level, $message, array $context = array()) { + public function log($level, $message, array $context = []) { if (!isset($context['hostname'])) { $context['hostname'] = CRM_Utils_System::ipAddress(); } $rec = new CRM_Core_DAO_SystemLog(); - $separateFields = array('contact_id', 'hostname'); + $separateFields = ['contact_id', 'hostname']; foreach ($separateFields as $separateField) { if (isset($context[$separateField])) { $rec->{$separateField} = $context[$separateField];