Symfony2.8升级到symfony3.4,Logger报错

Symfony2.8 upgraded to symfony3.4, Logger has an error

use Psr\Log\LoggerInterface;

class TestController extends Controller
{
    public function indexAction(Request $request, LoggerInterface $logger)
    {
        $logger->info('this is a Logger info!');
        return new Response('123456');
    }
}

requires that you provide a value for the "$logger" argument. Either the argument is nullable and no null value has been provided, no default value has been provided or because there is a non optional argument after this one. in /home/Workspaces/rlife_api/vendor/symfony/symfony/src/Symfony/Component/HttpKernel/Controller/ArgumentResolver.php:78

请问如何解决这个问题???

有一个解决方案tag the cotnrollers and enable the autowire以便以正确的方式通过部门