X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FSystemLogger.php;h=64105889414032cccc0541d1c39ca96f25679800;hb=701fd7a63eb4b10a6b91a91c0c05dba1bbaf8b69;hp=0684d19aaf239065e84f1166edb5bef54b98715a;hpb=c3ba729df769eade45a1ea8a0cfd08f9599c43f2;p=civicrm-core.git diff --git a/CRM/Utils/SystemLogger.php b/CRM/Utils/SystemLogger.php index 0684d19aaf..6410588941 100644 --- a/CRM/Utils/SystemLogger.php +++ b/CRM/Utils/SystemLogger.php @@ -31,6 +31,7 @@ * @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];