code: protected function initLogger()
      {
          try {
              $this->logger = $this->container->get("logger");
          } catch (\League\Container\Exception\NotFoundException $e) {
              $this->logger = new \Psr\Log\NullLogger();
          }
      }
docs: Logger initialization