/** * [write 根据日志类型写到不同的日志文件] * @return [type] [description] */ public function write() { $text = $this->processLogs(); $text["application"] .= "[" . $_SERVER['REQUEST_URI'] . "] " . "[runing time]: " . (microtime(true) - YCF_BEGIN_TIME) . "\n"; foreach ($text as $key => $value) { if (empty($key)) { continue; } $fileName = $this->_logPath . $key . '.log'; $fp2 = fopen($fileName, "a+") or YcfUtils::exit("Log fatal Error !"); fwrite($fp2, $value); fclose($fp2); } }