/**
* 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
{
*/
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;
}
/**
* Delegates the creation of a logger based on config to other factories
+ *
+ * @internal
*/
final class DelegatingLoggerFactory implements LoggerFactory
{
/**
* The logger factory for the core logging instances
+ *
+ * @deprecated 2025.02 Implement `\Friendica\Core\Logger\Factory\LoggerFactory` instead
*/
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;
}
/**
* 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
*/
*/
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');
/**
* 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
*/
*/
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'));
/**
* interface for Util class for filesystem manipulation for Logger classes
+ *
+ * @internal
*/
interface FileSystemUtil
{