code: public function logger(LoggerInterface $logger = null) : LoggerInterface
      {
          if ($logger){
              $this->logger = $logger;
          }
          if (!$this->logger){
              $this->logger = new NullLogger;
          }
          return $this->logger;
      }
docs: Set/get logger
  
  @param LoggerInterface $logger
  
  @return LoggerInterface