X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FUtils%2FSystemLogger.php;h=6b9b68065151d9e03d001841196e5b10be96289e;hb=0554664067cdf3fb0f8e9210481a3346b905394a;hp=df2a25d752aebf2c9eb08219e3eae44bf43aaa70;hpb=e2bef98506001ad5960cb1a4b479f30b6ddfd530;p=civicrm-core.git diff --git a/CRM/Utils/SystemLogger.php b/CRM/Utils/SystemLogger.php index df2a25d752..6b9b680651 100644 --- a/CRM/Utils/SystemLogger.php +++ b/CRM/Utils/SystemLogger.php @@ -34,6 +34,9 @@ */ class CRM_Utils_SystemLogger extends Psr\Log\AbstractLogger implements \Psr\Log\LoggerInterface { public function log($level, $message, array $context = array()) { + if(!isset($context['hostname'])) { + $context['hostname'] = CRM_Utils_System::ipAddress(); + } $rec = new CRM_Core_DAO_SystemLog(); $separateFields = array('contact_id', 'hostname'); foreach ($separateFields as $separateField) {