diff options
author | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-03-29 22:25:26 +0200 |
---|---|---|
committer | Côme Chilliet <come.chilliet@nextcloud.com> | 2022-04-26 16:50:47 +0200 |
commit | 51f04ed5144d4c111970aa976f0ce58ae23e079d (patch) | |
tree | 356b46805a8baddddc077a871b3bc629ac85a8d8 /lib/private/DateTimeZone.php | |
parent | dffbddcca6fa0221b8f2ac138732cf01154a5187 (diff) | |
download | nextcloud-server-51f04ed5144d4c111970aa976f0ce58ae23e079d.tar.gz nextcloud-server-51f04ed5144d4c111970aa976f0ce58ae23e079d.zip |
Move away from deprecated ILogger
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
Diffstat (limited to 'lib/private/DateTimeZone.php')
-rw-r--r-- | lib/private/DateTimeZone.php | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/private/DateTimeZone.php b/lib/private/DateTimeZone.php index 49e255c75c8..c514f8d7465 100644 --- a/lib/private/DateTimeZone.php +++ b/lib/private/DateTimeZone.php @@ -26,8 +26,8 @@ namespace OC; use OCP\IConfig; use OCP\IDateTimeZone; -use OCP\ILogger; use OCP\ISession; +use Psr\Log\LoggerInterface; class DateTimeZone implements IDateTimeZone { /** @var IConfig */ @@ -65,7 +65,7 @@ class DateTimeZone implements IDateTimeZone { try { return new \DateTimeZone($timeZone); } catch (\Exception $e) { - \OCP\Util::writeLog('datetimezone', 'Failed to created DateTimeZone "' . $timeZone . "'", ILogger::DEBUG); + \OC::$server->get(LoggerInterface::class)->debug('Failed to created DateTimeZone "' . $timeZone . '"', ['app' => 'datetimezone']); return new \DateTimeZone($this->getDefaultTimeZone()); } } @@ -110,7 +110,7 @@ class DateTimeZone implements IDateTimeZone { } // No timezone found, fallback to UTC - \OCP\Util::writeLog('datetimezone', 'Failed to find DateTimeZone for offset "' . $offset . "'", ILogger::DEBUG); + \OC::$server->get(LoggerInterface::class)->debug('Failed to find DateTimeZone for offset "' . $offset . '"', ['app' => 'datetimezone']); return new \DateTimeZone($this->getDefaultTimeZone()); } } |