1
0

ILogFactory.php 717 B

12345678910111213141516171819202122232425262728293031
  1. <?php
  2. /**
  3. * SPDX-FileCopyrightText: 2018 Nextcloud GmbH and Nextcloud contributors
  4. * SPDX-License-Identifier: AGPL-3.0-or-later
  5. */
  6. namespace OCP\Log;
  7. use Psr\Log\LoggerInterface;
  8. /**
  9. * Interface ILogFactory
  10. *
  11. * @since 14.0.0
  12. */
  13. interface ILogFactory {
  14. /**
  15. * @param string $type - one of: file, errorlog, syslog, systemd
  16. * @return IWriter
  17. * @since 14.0.0
  18. */
  19. public function get(string $type): IWriter;
  20. /**
  21. * @param string $path
  22. * @param string $type
  23. * @param string $tag
  24. * @return LoggerInterface
  25. * @since 22.0.0 - Parameters $type and $tag were added in 24.0.0
  26. */
  27. public function getCustomPsrLogger(string $path, string $type = 'file', string $tag = 'Nextcloud'): LoggerInterface;
  28. }