コード例 #1
0
ファイル: error_manager.php プロジェクト: hardikamutech/loov
 private function handleLog($data)
 {
     if ($this->logger === null) {
         return;
     }
     $trace = !empty($data['trace']) ? ' Trace: [' . str_replace(PHP_EOL, ' | ', $data['trace']) . ']' : "";
     $message = 'Message: ' . $data['message'] . ' File: ' . $data['file'] . ' Line:' . $data['line'] . $trace;
     $this->logger->addEntry($message, $data['type']);
 }
コード例 #2
0
ファイル: log.php プロジェクト: ZyXelP/oxwall
 /**
  * Returns logger object.
  *
  * @param string $type
  * @return OW_Log
  */
 public static function getInstance($type)
 {
     if (self::$classInstances === null) {
         self::$classInstances = array();
     }
     if (empty(self::$classInstances[$type])) {
         self::$classInstances[$type] = new self($type);
     }
     return self::$classInstances[$type];
 }
コード例 #3
0
ファイル: ow.php プロジェクト: hardikamutech/hammu
 public static function getLogger($logType = 'ow')
 {
     return OW_Log::getInstance($logType);
 }