summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorLukas Reschke <lukas@statuscode.ch>2017-02-13 22:49:44 +0100
committerLukas Reschke <lukas@statuscode.ch>2017-02-13 22:49:44 +0100
commita422a59f991daab9f87c628ad678455909d38622 (patch)
treef65c971b54b7d16ff31214d314ec473588074e32 /lib
parentfa684c0ef074d3d76beb9b0e735c8c0103d2bdb0 (diff)
downloadnextcloud-server-a422a59f991daab9f87c628ad678455909d38622.tar.gz
nextcloud-server-a422a59f991daab9f87c628ad678455909d38622.zip
Add storage to log item as well
Signed-off-by: Lukas Reschke <lukas@statuscode.ch>
Diffstat (limited to 'lib')
-rw-r--r--lib/private/Files/Storage/Common.php36
1 files changed, 33 insertions, 3 deletions
diff --git a/lib/private/Files/Storage/Common.php b/lib/private/Files/Storage/Common.php
index f0d0faac2c0..0a0604ddd9c 100644
--- a/lib/private/Files/Storage/Common.php
+++ b/lib/private/Files/Storage/Common.php
@@ -688,7 +688,17 @@ abstract class Common implements Storage, ILockingStorage {
$logger = $this->getLockLogger();
if ($logger) {
$typeString = ($type === ILockingProvider::LOCK_SHARED) ? 'shared' : 'exclusive';
- $logger->info('acquire ' . $typeString . ' lock on ' . $path, ['app' => 'locking']);
+ $logger->info(
+ sprintf(
+ 'acquire %s lock on "%s" on storage "%s"',
+ $typeString,
+ $path,
+ $this->getId()
+ ),
+ [
+ 'app' => 'locking',
+ ]
+ );
}
try {
$provider->acquireLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);
@@ -708,7 +718,17 @@ abstract class Common implements Storage, ILockingStorage {
$logger = $this->getLockLogger();
if ($logger) {
$typeString = ($type === ILockingProvider::LOCK_SHARED) ? 'shared' : 'exclusive';
- $logger->info('release ' . $typeString . ' lock on ' . $path, ['app' => 'locking']);
+ $logger->info(
+ sprintf(
+ 'release %s lock on "%s" on storage "%s"',
+ $typeString,
+ $path,
+ $this->getId()
+ ),
+ [
+ 'app' => 'locking',
+ ]
+ );
}
try {
$provider->releaseLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);
@@ -728,7 +748,17 @@ abstract class Common implements Storage, ILockingStorage {
$logger = $this->getLockLogger();
if ($logger) {
$typeString = ($type === ILockingProvider::LOCK_SHARED) ? 'shared' : 'exclusive';
- $logger->info('change lock on ' . $path . ' to ' . $typeString, ['app' => 'locking']);
+ $logger->info(
+ sprintf(
+ 'change lock on "%s" to %s on storage "%s"',
+ $path,
+ $typeString,
+ $this->getId()
+ ),
+ [
+ 'app' => 'locking',
+ ]
+ );
}
try {
$provider->changeLock('files/' . md5($this->getId() . '::' . trim($path, '/')), $type);