示例#1
0
 /**
  * Get the log info as an associative array.
  */
 private static function get_struct($message, $level)
 {
     if (self::$machine === null) {
         self::$machine = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : 'localhost';
     }
     return array('machine' => self::$machine, 'date' => gmdate('Y-m-d H:i:s'), 'level' => $level, 'message' => $message);
 }
示例#2
0
 /**
  * Get the log info as an associative array.
  */
 private static function get_struct($message, $level)
 {
     if (self::$machine === null) {
         self::$machine = isset($_SERVER['SERVER_ADDR']) ? $_SERVER['SERVER_ADDR'] : 'localhost';
     }
     $dt = new \DateTime('now', new \DateTimeZone(self::$timezone));
     return array('machine' => self::$machine, 'date' => $dt->format(self::$date_format), 'level' => $level, 'message' => $message);
 }