use OCP\EventDispatcher\Event;
use OCP\EventDispatcher\IEventListener;
use OCP\IL10N;
-use OCP\ILogger;
use OCP\IUserManager;
+use Psr\Log\LoggerInterface;
use Sabre\VObject\Component\VCard;
use Sabre\VObject\Reader;
use Sabre\VObject\UUIDUtil;
/** @var IL10N */
private $l10n;
- /** @var ILogger */
+ /** @var LoggerInterface */
private $logger;
public function __construct(RecentContactMapper $mapper,
IUserManager $userManager,
ITimeFactory $timeFactory,
IL10N $l10nFactory,
- ILogger $logger) {
+ LoggerInterface $logger) {
$this->mapper = $mapper;
$this->cardSearchDao = $cardSearchDao;
$this->userManager = $userManager;
$parsed->CATEGORIES = $this->l10n->t('Recently contacted');
$contact->setCard($parsed->serialize());
} catch (Throwable $e) {
- $this->logger->logException($e, [
- 'message' => 'Could not parse card to add recent category: ' . $e->getMessage(),
- 'level' => ILogger::WARN,
- ]);
+ $this->logger->warning(
+ 'Could not parse card to add recent category: ' . $e->getMessage(),
+ [
+ 'exception' => $e,
+ ]);
$contact->setCard($copy);
}
} else {