protected function getFileName(): string
    {
        if ($this->generatedFileName === null || Application::isCli()) {
            if ($this->fileNameFn !== null) {
                $this->generatedFileName = call_user_func($this->fileNameFn);
            } else {
                $this->generatedFileName = gmdate('Y-m-d') . '.log';
            }
        }

        return $this->generatedFileName;
    }