Ei kuvausta

DebugLoggerInterface.php 1.2KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  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. * A log is an array with the following mandatory keys:
  23. * timestamp, message, priority, and priorityName.
  24. * It can also have an optional context key containing an array.
  25. *
  26. * @param Request|null $request The request to get logs for
  27. *
  28. * @return array An array of logs
  29. */
  30. public function getLogs(/* Request $request = null */);
  31. /**
  32. * Returns the number of errors.
  33. *
  34. * @param Request|null $request The request to count logs for
  35. *
  36. * @return int The number of errors
  37. */
  38. public function countErrors(/* Request $request = null */);
  39. /**
  40. * Removes all log records.
  41. */
  42. public function clear();
  43. }