protected static function getLogFile($folder, $noAppend = false) {
        if(!isset(self::$logCache[$folder . date("mdy_h")]) || $noAppend) {
            $logFolder = GomaENV::getDataDirectory() . LOG_FOLDER . "/" . $folder . "/" . date("m-d-y") . "/";

            if (!is_dir($logFolder)) {
                if (!mkdir($logFolder, 0777, true)) {
                    throw new \LogicException("LOG_FOLDER should be writable.");
                }
            }

            $noAppendFileName = $noAppend ? date("H_i_s") . "_" : "";
            $file = $logFolder . $noAppendFileName . "1.log";
            $i = 1;
            while (file_exists($logFolder . $noAppendFileName . $i . ".log") && ($noAppend || filesize($file) > static::$fileSizeLimit)) {
                $i++;
                $file = $logFolder . $noAppendFileName . $i . ".log";
            }

            self::$logCache[$folder . date("mdy_h")] = $file;
        }

        return self::$logCache[$folder . date("mdy_h")];
    }