X-Git-Url: https://vcs.fsf.org/?a=blobdiff_plain;f=CRM%2FCore%2FLock.php;h=cc4c049b52453d920728f8b0ec34ad48275c20dd;hb=f8307138bf292130a628e68f346535b398ae9b63;hp=894b913ab2d60094ab567f499086d2eb576e7003;hpb=95c42d8be0834773e0b606a1c79471f4733060ab;p=civicrm-core.git diff --git a/CRM/Core/Lock.php b/CRM/Core/Lock.php index 894b913ab2..cc4c049b52 100644 --- a/CRM/Core/Lock.php +++ b/CRM/Core/Lock.php @@ -22,7 +22,7 @@ class CRM_Core_Lock implements \Civi\Core\Lock\LockInterface { * Prior to version 5.7.5 mysql only supports a single named lock. This variable is * part of the skullduggery involved in 'say it's no so Frank'. * - * See further comments on the aquire function. + * See further comments on the acquire function. * * @var bool */ @@ -124,7 +124,7 @@ class CRM_Core_Lock implements \Civi\Core\Lock\LockInterface { // MySQL 5.7 doesn't like long lock names so creating a lock id $this->_id = sha1($this->_name); if (defined('CIVICRM_LOCK_DEBUG')) { - CRM_Core_Error::debug_log_message('trying to construct lock for ' . $this->_name . '(' . $this->_id . ')'); + \Civi::log()->debug('trying to construct lock for ' . $this->_name . '(' . $this->_id . ')'); } $this->_timeout = $timeout !== NULL ? $timeout : self::TIMEOUT; } @@ -177,7 +177,7 @@ class CRM_Core_Lock implements \Civi\Core\Lock\LockInterface { $res = CRM_Core_DAO::singleValueQuery($query, $params); if ($res) { if (defined('CIVICRM_LOCK_DEBUG')) { - CRM_Core_Error::debug_log_message('acquire lock for ' . $this->_name . '(' . $this->_id . ')'); + \Civi::log()->debug('acquire lock for ' . $this->_name . '(' . $this->_id . ')'); } $this->_hasLock = TRUE; if (stristr($this->_name, 'data.mailing.job.')) { @@ -186,7 +186,7 @@ class CRM_Core_Lock implements \Civi\Core\Lock\LockInterface { } else { if (defined('CIVICRM_LOCK_DEBUG')) { - CRM_Core_Error::debug_log_message('failed to acquire lock for ' . $this->_name . '(' . $this->_id . ')'); + \Civi::log()->debug('failed to acquire lock for ' . $this->_name . '(' . $this->_id . ')'); } } } @@ -199,7 +199,7 @@ class CRM_Core_Lock implements \Civi\Core\Lock\LockInterface { public function release() { if ($this->_hasLock) { if (defined('CIVICRM_LOCK_DEBUG')) { - CRM_Core_Error::debug_log_message('release lock for ' . $this->_name . '(' . $this->_id . ')'); + \Civi::log()->debug('release lock for ' . $this->_name . '(' . $this->_id . ')'); } $this->_hasLock = FALSE; @@ -244,11 +244,11 @@ class CRM_Core_Lock implements \Civi\Core\Lock\LockInterface { */ public function hackyHandleBrokenCode($jobLog) { if (stristr($this->_name, 'job')) { - CRM_Core_Error::debug_log_message('lock acquisition for ' . $this->_name . '(' . $this->_id . ')' . ' attempted when ' . $jobLog . ' is not released'); + \Civi::log()->debug('lock acquisition for ' . $this->_name . '(' . $this->_id . ')' . ' attempted when ' . $jobLog . ' is not released'); throw new CRM_Core_Exception('lock acquisition for ' . $this->_name . '(' . $this->_id . ')' . ' attempted when ' . $jobLog . ' is not released'); } if (defined('CIVICRM_LOCK_DEBUG')) { - CRM_Core_Error::debug_log_message('(CRM-12856) faking lock for ' . $this->_name . '(' . $this->_id . ')'); + \Civi::log()->debug('(CRM-12856) faking lock for ' . $this->_name . '(' . $this->_id . ')'); } $this->_hasLock = TRUE; return TRUE;