mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-17 10:05:43 +02:00
Remove ProvideLoggerEvent
This commit is contained in:
parent
1f84917aed
commit
14314a3835
1 changed files with 0 additions and 48 deletions
|
@ -1,48 +0,0 @@
|
|||
<?php
|
||||
|
||||
// Copyright (C) 2010-2024, the Friendica project
|
||||
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
|
||||
//
|
||||
// SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Friendica\Event;
|
||||
|
||||
use Psr\Log\LoggerInterface;
|
||||
|
||||
/**
|
||||
* Allows a listener to provide a different Logger implementation.
|
||||
*/
|
||||
final class ProvideLoggerEvent implements NamedEvent
|
||||
{
|
||||
/**
|
||||
* Friendica is initialized.
|
||||
*/
|
||||
public const NAME = 'friendica.container.logger';
|
||||
|
||||
private string $name;
|
||||
|
||||
private LoggerInterface $logger;
|
||||
|
||||
public function __construct(LoggerInterface $logger)
|
||||
{
|
||||
$this->name = self::NAME;
|
||||
$this->logger = $logger;
|
||||
}
|
||||
|
||||
public function getName(): string
|
||||
{
|
||||
return $this->name;
|
||||
}
|
||||
|
||||
public function getLogger(): LoggerInterface
|
||||
{
|
||||
return $this->logger;
|
||||
}
|
||||
|
||||
public function setLogger(LoggerInterface $logger): void
|
||||
{
|
||||
$this->logger = $logger;
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue