DebugLoggerInterface.php 1.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. <?php
  2. /*
  3. * This file is part of the Symfony package.
  4. *
  5. * (c) Fabien Potencier <fabien@symfony.com>
  6. *
  7. * For the full copyright and license information, please view the LICENSE
  8. * file that was distributed with this source code.
  9. */
  10. namespace Symfony\Component\HttpKernel\Log;
  11. use Symfony\Component\HttpFoundation\Request;
  12. /**
  13. * DebugLoggerInterface.
  14. *
  15. * @author Fabien Potencier <fabien@symfony.com>
  16. */
  17. interface DebugLoggerInterface
  18. {
  19. /**
  20. * Returns an array of logs.
  21. *
  22. * @return array<array{
  23. * channel: ?string,
  24. * context: array<string, mixed>,
  25. * message: string,
  26. * priority: int,
  27. * priorityName: string,
  28. * timestamp: int,
  29. * timestamp_rfc3339: string,
  30. * }>
  31. */
  32. public function getLogs(?Request $request = null): array;
  33. /**
  34. * Returns the number of errors.
  35. */
  36. public function countErrors(?Request $request = null): int;
  37. /**
  38. * Removes all log records.
  39. */
  40. public function clear(): void;
  41. }