public function setLogDirectory(?string $path): self
    {
        if (null !== $path) {
            if (!is_dir($path)) {
                throw new InvalidArgumentException(sprintf(
                    "Tracy log path '%s' does`t exists",
                    $path
                ));
            }

            $path = realpath($path);
        }

        $this->logDirectory = $path;
        return $this;
    }