public function genLogFile($createDir = false)
    {
        // log split type
        if (!($type = $this->spiltType) || !($file = $this->file)) {
            return $this->file;
        }

        $info = pathinfo($file);
        $dir = $info['dirname'];
        $name = $info['filename'] ?? 'gw-manager';
        $ext = $info['extension'] ?? 'log';

        if ($createDir) {
            Directory::mkdir($dir, 0775);
        }

        $str = $this->getLogFileDate();

        return "{$dir}/{$name}_{$str}.{$ext}";
    }