25 lines
		
	
	
		
			583 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			25 lines
		
	
	
		
			583 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
| <?php
 | |
| 
 | |
| namespace App\Ardent\LoggerBundle\Controller;
 | |
| 
 | |
| use App\Ardent\LoggerBundle\Service\LoggerService;
 | |
| use Symfony\Bundle\FrameworkBundle\Controller\AbstractController;
 | |
| use Symfony\Component\Routing\Annotation\Route;
 | |
| 
 | |
| class LogViewController extends AbstractController
 | |
| {
 | |
|     /**
 | |
|      * @Route(path="/view/latest/{amount}")
 | |
|      */
 | |
|     public function latestLogs(LoggerService $ls, $amount = 10)
 | |
|     {
 | |
|         $logs = $ls->getLatest($amount);
 | |
| 
 | |
|         dump(($logs));
 | |
| 
 | |
|         return $this->render('@ArdentLogger/errors.html.twig', [
 | |
|             'logs' => $logs,
 | |
|         ]);
 | |
|     }
 | |
| }
 |