public static function output() { if (DEBUG == 2) { foreach (self::$_log as $path => $arrLog) { $arrLog['content'] .= "===============================\n\n"; if ($arrLog['type']) { file_put_contents(self::$_path . '/' . $path, $arrLog['content'], FILE_APPEND); } else { if (!file_exists(self::$_path . '/' . $path)) { mkdir(self::$_path . '/' . $path); } file_put_contents(self::$_path . '/' . $path . '/' . date('YmdH'), $arrLog['content'], FILE_APPEND); } } self::$_log = array(); } }