Inject logger in symfony service

<?php
// /app/src/Wps/FooService.php
// symfony v7.0

namespace App\Wps;

use Psr\Log\LoggerInterface;

class FooService 
{

    public function __construct( private LoggerInterface $logger )
    {
    }

    public function bar()
    {
        $this->logger->info('bar');
    }

}