Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/spreed.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <coding@schilljs.com>2020-07-31 17:25:33 +0300
committerJoas Schilling <coding@schilljs.com>2020-08-03 14:38:45 +0300
commitb6829acbaabb2e323fb0b0c12d0251485d2e8781 (patch)
treef7284c9bddd6ba39187e4fd58b15d8ac0751336e /lib/Signaling
parentdea5040713e0a574d5bf95152a10db656ac75757 (diff)
Move to Psr\Log\LoggerInterface
Signed-off-by: Joas Schilling <coding@schilljs.com>
Diffstat (limited to 'lib/Signaling')
-rw-r--r--lib/Signaling/BackendNotifier.php25
1 files changed, 11 insertions, 14 deletions
diff --git a/lib/Signaling/BackendNotifier.php b/lib/Signaling/BackendNotifier.php
index 3633086cd..da2d3aa0c 100644
--- a/lib/Signaling/BackendNotifier.php
+++ b/lib/Signaling/BackendNotifier.php
@@ -29,14 +29,14 @@ use OCA\Talk\Config;
use OCA\Talk\Participant;
use OCA\Talk\Room;
use OCP\Http\Client\IClientService;
-use OCP\ILogger;
use OCP\IUrlGenerator;
use OCP\Security\ISecureRandom;
+use Psr\Log\LoggerInterface;
class BackendNotifier {
/** @var Config */
private $config;
- /** @var ILogger */
+ /** @var LoggerInterface */
private $logger;
/** @var IClientService */
private $clientService;
@@ -48,7 +48,7 @@ class BackendNotifier {
private $urlGenerator;
public function __construct(Config $config,
- ILogger $logger,
+ LoggerInterface $logger,
IClientService $clientService,
ISecureRandom $secureRandom,
Manager $signalingManager,
@@ -79,10 +79,7 @@ class BackendNotifier {
try {
$client->post($url, $params);
} catch (\Exception $e) {
- $this->logger->logException($e, [
- 'app' => 'spreed',
- 'message' => 'Failed to send message to signaling server',
- ]);
+ $this->logger->error('Failed to send message to signaling server', ['exception' => $e]);
}
}
@@ -141,7 +138,7 @@ class BackendNotifier {
* @throws \Exception
*/
public function roomInvited(Room $room, array $users): void {
- $this->logger->info('Now invited to ' . $room->getToken() . ': ' . print_r($users, true), ['app' => 'spreed']);
+ $this->logger->info('Now invited to ' . $room->getToken() . ': ' . print_r($users, true));
$userIds = [];
foreach ($users as $user) {
$userIds[] = $user['userId'];
@@ -166,7 +163,7 @@ class BackendNotifier {
* @throws \Exception
*/
public function roomsDisinvited(Room $room, array $userIds): void {
- $this->logger->info('No longer invited to ' . $room->getToken() . ': ' . print_r($userIds, true), ['app' => 'spreed']);
+ $this->logger->info('No longer invited to ' . $room->getToken() . ': ' . print_r($userIds, true));
$this->backendRequest($room, [
'type' => 'disinvite',
'disinvite' => [
@@ -187,7 +184,7 @@ class BackendNotifier {
* @throws \Exception
*/
public function roomSessionsRemoved(Room $room, array $sessionIds): void {
- $this->logger->info('Removed from ' . $room->getToken() . ': ' . print_r($sessionIds, true), ['app' => 'spreed']);
+ $this->logger->info('Removed from ' . $room->getToken() . ': ' . print_r($sessionIds, true));
$this->backendRequest($room, [
'type' => 'disinvite',
'disinvite' => [
@@ -207,7 +204,7 @@ class BackendNotifier {
* @throws \Exception
*/
public function roomModified(Room $room): void {
- $this->logger->info('Room modified: ' . $room->getToken(), ['app' => 'spreed']);
+ $this->logger->info('Room modified: ' . $room->getToken());
$this->backendRequest($room, [
'type' => 'update',
'update' => [
@@ -225,7 +222,7 @@ class BackendNotifier {
* @throws \Exception
*/
public function roomDeleted(Room $room, array $participants): void {
- $this->logger->info('Room deleted: ' . $room->getToken(), ['app' => 'spreed']);
+ $this->logger->info('Room deleted: ' . $room->getToken());
$userIds = array_keys($participants['users']);
$this->backendRequest($room, [
'type' => 'delete',
@@ -243,7 +240,7 @@ class BackendNotifier {
* @throws \Exception
*/
public function participantsModified(Room $room, array $sessionIds): void {
- $this->logger->info('Room participants modified: ' . $room->getToken() . ' ' . print_r($sessionIds, true), ['app' => 'spreed']);
+ $this->logger->info('Room participants modified: ' . $room->getToken() . ' ' . print_r($sessionIds, true));
$changed = [];
$users = [];
$participants = $room->getParticipantsLegacy();
@@ -287,7 +284,7 @@ class BackendNotifier {
* @throws \Exception
*/
public function roomInCallChanged(Room $room, int $flags, array $sessionIds): void {
- $this->logger->info('Room in-call status changed: ' . $room->getToken() . ' ' . $flags . ' ' . print_r($sessionIds, true), ['app' => 'spreed']);
+ $this->logger->info('Room in-call status changed: ' . $room->getToken() . ' ' . $flags . ' ' . print_r($sessionIds, true));
$changed = [];
$users = [];
$participants = $room->getParticipantsLegacy();