You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -89,15 +92,15 @@ public function acquire($blocking = false)
89
92
returntrue;
90
93
} catch (LockConflictedException$e) {
91
94
$this->dirty = false;
92
-
$this->logger->warning('Failed to acquire the "{resource}" lock. Someone else already acquired the lock.', array('resource' => $this->key));
95
+
$this->logger->log($this->logLevel ?? 'warning', 'Failed to acquire the "{resource}" lock. Someone else already acquired the lock.', array('resource' => $this->key));
93
96
94
97
if ($blocking) {
95
98
throw$e;
96
99
}
97
100
98
101
returnfalse;
99
102
} catch (\Exception$e) {
100
-
$this->logger->warning('Failed to acquire the "{resource}" lock.', array('resource' => $this->key, 'exception' => $e));
103
+
$this->logger->log($this->logLevel ?? 'warning', 'Failed to acquire the "{resource}" lock.', array('resource' => $this->key, 'exception' => $e));
101
104
thrownewLockAcquiringException(sprintf('Failed to acquire the "%s" lock.', $this->key), 0, $e);
102
105
}
103
106
}
@@ -123,10 +126,10 @@ public function refresh()
123
126
$this->logger->info('Expiration defined for "{resource}" lock for "{ttl}" seconds.', array('resource' => $this->key, 'ttl' => $this->ttl));
124
127
} catch (LockConflictedException$e) {
125
128
$this->dirty = false;
126
-
$this->logger->warning('Failed to define an expiration for the "{resource}" lock, someone else acquired the lock.', array('resource' => $this->key));
129
+
$this->logger->log($this->logLevel ?? 'warning', 'Failed to define an expiration for the "{resource}" lock, someone else acquired the lock.', array('resource' => $this->key));
127
130
throw$e;
128
131
} catch (\Exception$e) {
129
-
$this->logger->warning('Failed to define an expiration for the "{resource}" lock.', array('resource' => $this->key, 'exception' => $e));
132
+
$this->logger->log($this->logLevel ?? 'warning', 'Failed to define an expiration for the "{resource}" lock.', array('resource' => $this->key, 'exception' => $e));
130
133
thrownewLockAcquiringException(sprintf('Failed to define an expiration for the "%s" lock.', $this->key), 0, $e);
131
134
}
132
135
}
@@ -148,7 +151,7 @@ public function release()
148
151
$this->dirty = false;
149
152
150
153
if ($this->store->exists($this->key)) {
151
-
$this->logger->warning('Failed to release the "{resource}" lock.', array('resource' => $this->key));
154
+
$this->logger->log($this->logLevel ?? 'warning', 'Failed to release the "{resource}" lock.', array('resource' => $this->key));
152
155
thrownewLockReleasingException(sprintf('Failed to release the "%s" lock.', $this->key));
0 commit comments