diff options
author | Marcel Klehr <mklehr@gmx.net> | 2024-05-07 12:46:21 +0200 |
---|---|---|
committer | Marcel Klehr <mklehr@gmx.net> | 2024-05-14 11:38:41 +0200 |
commit | 4a3b9b826ea532991f8636b621f92760c321e93e (patch) | |
tree | 46c57ff0648993a2025ca7d25d0c491fc66f92b5 /lib/private/Log | |
parent | fff2fb8e77c7a58aa9323c13daa355d6d8f3a118 (diff) | |
download | nextcloud-server-4a3b9b826ea532991f8636b621f92760c321e93e.tar.gz nextcloud-server-4a3b9b826ea532991f8636b621f92760c321e93e.zip |
refactor: identifier is now customId/custom_id
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
Diffstat (limited to 'lib/private/Log')
-rw-r--r-- | lib/private/Log/PsrLoggerAdapter.php | 37 |
1 files changed, 18 insertions, 19 deletions
diff --git a/lib/private/Log/PsrLoggerAdapter.php b/lib/private/Log/PsrLoggerAdapter.php index 8b397ef8905..b126cb52d77 100644 --- a/lib/private/Log/PsrLoggerAdapter.php +++ b/lib/private/Log/PsrLoggerAdapter.php @@ -31,7 +31,6 @@ use OCP\ILogger; use OCP\Log\IDataLogger; use Psr\Log\InvalidArgumentException; use Psr\Log\LoggerInterface; -use Stringable; use Throwable; use function array_key_exists; use function array_merge; @@ -53,10 +52,10 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger { /** * System is unusable. * - * @param string|Stringable $message + * @param $message * @param mixed[] $context */ - public function emergency(string|Stringable $message, array $context = []): void { + public function emergency($message, array $context = []): void { if ($this->containsThrowable($context)) { $this->logger->logException($context['exception'], array_merge( [ @@ -76,10 +75,10 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger { * Example: Entire website down, database unavailable, etc. This should * trigger the SMS alerts and wake you up. * - * @param string|Stringable $message + * @param $message * @param mixed[] $context */ - public function alert(string|Stringable $message, array $context = []): void { + public function alert($message, array $context = []): void { if ($this->containsThrowable($context)) { $this->logger->logException($context['exception'], array_merge( [ @@ -98,10 +97,10 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger { * * Example: Application component unavailable, unexpected exception. * - * @param string|Stringable $message + * @param $message * @param mixed[] $context */ - public function critical(string|Stringable $message, array $context = []): void { + public function critical($message, array $context = []): void { if ($this->containsThrowable($context)) { $this->logger->logException($context['exception'], array_merge( [ @@ -119,10 +118,10 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger { * Runtime errors that do not require immediate action but should typically * be logged and monitored. * - * @param string|Stringable $message + * @param $message * @param mixed[] $context */ - public function error(string|Stringable $message, array $context = []): void { + public function error($message, array $context = []): void { if ($this->containsThrowable($context)) { $this->logger->logException($context['exception'], array_merge( [ @@ -142,10 +141,10 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger { * Example: Use of deprecated APIs, poor use of an API, undesirable things * that are not necessarily wrong. * - * @param string|Stringable $message + * @param $message * @param mixed[] $context */ - public function warning(string|Stringable $message, array $context = []): void { + public function warning($message, array $context = []): void { if ($this->containsThrowable($context)) { $this->logger->logException($context['exception'], array_merge( [ @@ -162,10 +161,10 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger { /** * Normal but significant events. * - * @param string|Stringable $message + * @param $message * @param mixed[] $context */ - public function notice(string|Stringable $message, array $context = []): void { + public function notice($message, array $context = []): void { if ($this->containsThrowable($context)) { $this->logger->logException($context['exception'], array_merge( [ @@ -184,10 +183,10 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger { * * Example: User logs in, SQL logs. * - * @param string|Stringable $message + * @param $message * @param mixed[] $context */ - public function info(string|Stringable $message, array $context = []): void { + public function info($message, array $context = []): void { if ($this->containsThrowable($context)) { $this->logger->logException($context['exception'], array_merge( [ @@ -204,10 +203,10 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger { /** * Detailed debug information. * - * @param string|Stringable $message + * @param $message * @param mixed[] $context */ - public function debug(string|Stringable $message, array $context = []): void { + public function debug($message, array $context = []): void { if ($this->containsThrowable($context)) { $this->logger->logException($context['exception'], array_merge( [ @@ -225,12 +224,12 @@ final class PsrLoggerAdapter implements LoggerInterface, IDataLogger { * Logs with an arbitrary level. * * @param mixed $level - * @param string|Stringable $message + * @param $message * @param mixed[] $context * * @throws InvalidArgumentException */ - public function log($level, string|Stringable $message, array $context = []): void { + public function log($level, $message, array $context = []): void { if (!is_int($level) || $level < ILogger::DEBUG || $level > ILogger::FATAL) { throw new InvalidArgumentException('Nextcloud allows only integer log levels'); } |