Example #1
0
 /**
  * 保存日志
  * @param string $logString 日志信息
  * @param string $level 日志级别
  */
 public function log($logString, $level = 'info')
 {
     $logger = new FileLogger($this->logDir . $this->logFile);
     $lineFormatter = new LineFormatter();
     $lineFormatter->setDateFormat('Y-m-d H:i:s');
     $logger->setFormatter($lineFormatter);
     $logger->log($logString, $this->log_level[$level]);
 }
Example #2
0
 public function setDateFormat($dateFormat)
 {
     parent::setDateFormat($dateFormat);
 }