Esempio n. 1
0
File: H.php Progetto: hfw/h
 /**
  * Event listener for the `log` event.
  *
  * @param string $message
  * @param int $type PHP error codes are converted to their human readable names when logging.
  */
 private static function onLog($message, $type = 100)
 {
     isset(X::$phpErrors[$type]) and $type = X::$phpErrors[$type];
     $preamble = "[{$type}] #" . I::id();
     isset($_SERVER['REMOTE_ADDR']) and $preamble .= " {$_SERVER['REMOTE_ADDR']} {$_SERVER['REQUEST_METHOD']} {$_SERVER['REQUEST_URI']}";
     error_log("{$preamble} {$message}");
 }