summaryrefslogtreecommitdiffstats
path: root/lib/private/Log/PsrLoggerAdapter.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/Log/PsrLoggerAdapter.php')
-rw-r--r--lib/private/Log/PsrLoggerAdapter.php12
1 files changed, 9 insertions, 3 deletions
diff --git a/lib/private/Log/PsrLoggerAdapter.php b/lib/private/Log/PsrLoggerAdapter.php
index c488441da41..8cd64bfe903 100644
--- a/lib/private/Log/PsrLoggerAdapter.php
+++ b/lib/private/Log/PsrLoggerAdapter.php
@@ -26,19 +26,21 @@ declare(strict_types=1);
namespace OC\Log;
+use OC\Log;
use OCP\ILogger;
+use OCP\Log\IDataLogger;
use Psr\Log\InvalidArgumentException;
use Psr\Log\LoggerInterface;
use Throwable;
use function array_key_exists;
use function array_merge;
-final class PsrLoggerAdapter implements LoggerInterface {
+final class PsrLoggerAdapter implements LoggerInterface, IDataLogger {
- /** @var ILogger */
+ /** @var Log */
private $logger;
- public function __construct(ILogger $logger) {
+ public function __construct(Log $logger) {
$this->logger = $logger;
}
@@ -260,4 +262,8 @@ final class PsrLoggerAdapter implements LoggerInterface {
$this->logger->log($level, $message, $context);
}
}
+
+ public function logData(string $message, array $data, array $context = []): void {
+ $this->logger->logData($message, $data, $context);
+ }
}