2018-04-24 16:14:00 -04:00
|
|
|
<?php
|
|
|
|
|
/**
|
2024-05-23 03:26:56 -04:00
|
|
|
* SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
|
|
|
|
|
* SPDX-License-Identifier: AGPL-3.0-or-later
|
2018-04-24 16:14:00 -04:00
|
|
|
*/
|
2018-04-24 20:27:43 -04:00
|
|
|
namespace OCP\Log;
|
2018-04-24 16:14:00 -04:00
|
|
|
|
2021-02-11 10:03:11 -05:00
|
|
|
use Psr\Log\LoggerInterface;
|
2018-04-24 20:27:43 -04:00
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Interface ILogFactory
|
|
|
|
|
*
|
|
|
|
|
* @since 14.0.0
|
|
|
|
|
*/
|
|
|
|
|
interface ILogFactory {
|
|
|
|
|
/**
|
2018-06-06 16:40:06 -04:00
|
|
|
* @param string $type - one of: file, errorlog, syslog, systemd
|
2018-04-24 20:27:43 -04:00
|
|
|
* @return IWriter
|
|
|
|
|
* @since 14.0.0
|
|
|
|
|
*/
|
|
|
|
|
public function get(string $type): IWriter;
|
|
|
|
|
|
2021-02-11 10:03:11 -05:00
|
|
|
/**
|
|
|
|
|
* @param string $path
|
2022-01-19 10:15:14 -05:00
|
|
|
* @param string $type
|
|
|
|
|
* @param string $tag
|
2021-02-11 10:03:11 -05:00
|
|
|
* @return LoggerInterface
|
2022-01-19 10:15:14 -05:00
|
|
|
* @since 22.0.0 - Parameters $type and $tag were added in 24.0.0
|
2021-02-11 10:03:11 -05:00
|
|
|
*/
|
2022-01-19 10:15:14 -05:00
|
|
|
public function getCustomPsrLogger(string $path, string $type = 'file', string $tag = 'Nextcloud'): LoggerInterface;
|
2018-04-24 16:14:00 -04:00
|
|
|
}
|