mirror of
https://git.friendi.ca/friendica/friendica.git
synced 2025-06-07 12:34:39 +02:00
Hard-deprecation for now unused factory classes
This commit is contained in:
parent
d410758cdd
commit
60ad014a6e
6 changed files with 18 additions and 2 deletions
|
@ -12,6 +12,8 @@ use Psr\Log\LogLevel;
|
|||
|
||||
/**
|
||||
* Abstract class for creating logger types, which includes common necessary logic/content
|
||||
*
|
||||
* @deprecated 2025.02 Implement `\Friendica\Core\Logger\Factory\LoggerFactory` instead
|
||||
*/
|
||||
abstract class AbstractLoggerTypeFactory
|
||||
{
|
||||
|
@ -25,6 +27,8 @@ abstract class AbstractLoggerTypeFactory
|
|||
*/
|
||||
public function __construct(IHaveCallIntrospections $introspection, string $channel)
|
||||
{
|
||||
@trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, implement `\Friendica\Core\Logger\Factory\LoggerFactory` instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->channel = $channel;
|
||||
$this->introspection = $introspection;
|
||||
}
|
||||
|
|
|
@ -15,6 +15,8 @@ use Psr\Log\NullLogger;
|
|||
|
||||
/**
|
||||
* Delegates the creation of a logger based on config to other factories
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
final class DelegatingLoggerFactory implements LoggerFactory
|
||||
{
|
||||
|
|
|
@ -18,6 +18,8 @@ use Throwable;
|
|||
|
||||
/**
|
||||
* The logger factory for the core logging instances
|
||||
*
|
||||
* @deprecated 2025.02 Implement `\Friendica\Core\Logger\Factory\LoggerFactory` instead
|
||||
*/
|
||||
class Logger
|
||||
{
|
||||
|
@ -26,6 +28,8 @@ class Logger
|
|||
|
||||
public function __construct(string $channel = LogChannel::DEFAULT)
|
||||
{
|
||||
@trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, implement `\Friendica\Core\Logger\Factory\LoggerFactory` instead.', E_USER_DEPRECATED);
|
||||
|
||||
$this->channel = $channel;
|
||||
}
|
||||
|
||||
|
|
|
@ -20,7 +20,7 @@ use Psr\Log\NullLogger;
|
|||
/**
|
||||
* The logger factory for the StreamLogger instance
|
||||
*
|
||||
* @deprecated 2025.02 Use `Friendica\Core\Logger\Factory\StreamLoggerFactory` instead
|
||||
* @deprecated 2025.02 Implement `\Friendica\Core\Logger\Factory\LoggerFactory` instead
|
||||
* @see StreamLoggerFactory
|
||||
* @see StreamLoggerClass
|
||||
*/
|
||||
|
@ -40,6 +40,8 @@ class StreamLogger extends AbstractLoggerTypeFactory
|
|||
*/
|
||||
public function create(IManageConfigValues $config, string $logfile = null, string $channel = null): LoggerInterface
|
||||
{
|
||||
@trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, implement `\Friendica\Core\Logger\Factory\LoggerFactory` instead.', E_USER_DEPRECATED);
|
||||
|
||||
$fileSystem = new FileSystem();
|
||||
|
||||
$logfile = $logfile ?? $config->get('system', 'logfile');
|
||||
|
|
|
@ -16,7 +16,7 @@ use Psr\Log\LoggerInterface;
|
|||
/**
|
||||
* The logger factory for the SyslogLogger instance
|
||||
*
|
||||
* @deprecated 2025.02 Use `Friendica\Core\Logger\Factory\SyslogLoggerFactory` instead
|
||||
* @deprecated 2025.02 Implement `\Friendica\Core\Logger\Factory\LoggerFactory` instead
|
||||
* @see SyslogLoggerFactory
|
||||
* @see SyslogLoggerClass
|
||||
*/
|
||||
|
@ -33,6 +33,8 @@ class SyslogLogger extends AbstractLoggerTypeFactory
|
|||
*/
|
||||
public function create(IManageConfigValues $config): LoggerInterface
|
||||
{
|
||||
@trigger_error('Class `' . __CLASS__ . '` is deprecated since 2025.02 and will be removed after 5 months, implement `\Friendica\Core\Logger\Factory\LoggerFactory` instead.', E_USER_DEPRECATED);
|
||||
|
||||
$logOpts = $config->get('system', 'syslog_flags') ?? SyslogLoggerClass::DEFAULT_FLAGS;
|
||||
$logFacility = $config->get('system', 'syslog_facility') ?? SyslogLoggerClass::DEFAULT_FACILITY;
|
||||
$loglevel = SyslogLogger::mapLegacyConfigDebugLevel($config->get('system', 'loglevel'));
|
||||
|
|
|
@ -11,6 +11,8 @@ use Friendica\Core\Logger\Exception\LoggerUnusableException;
|
|||
|
||||
/**
|
||||
* interface for Util class for filesystem manipulation for Logger classes
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
interface FileSystemUtil
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue