Authored by whb

UDP

... ... @@ -51,10 +51,10 @@ class UdpLog
'file'=> $file,
'line'=> $line,
'message' => $message,
'meta' => serialize($meta)
'meta' => serialize($meta)
);
//make a line
$string = implode('|', $tags);//format: time|level|host|file|line|message|meta
$string = implode('|', $tags); //format: time|level|host|file|line|message|meta
if(self::RECORD_MODE == self::RECORD_MODE_UDP) {
self::send($string);
}
... ... @@ -126,36 +126,36 @@ class UdpLog
/**
* info log
* @param $message
* @param $meta
* @param mixed $meta
*/
public static function info($message,$meta='') {
self::procLog(__METHOD__,$message,debug_backtrace(),$meta);
public static function info($message, $meta = '') {
self::procLog(__METHOD__, $message, debug_backtrace(), $meta);
}
/**
* warn log
* @param $message
* @param $meta
* @param mixed $meta
*/
public static function warn($message,$meta='') {
self::procLog(__METHOD__,$message,debug_backtrace(),$meta);
public static function warn($message, $meta = '') {
self::procLog(__METHOD__, $message, debug_backtrace(), $meta);
}
/**
* error log
* @param $message
* @param $meta
* @param mixed $meta
*/
public static function error($message,$meta='') {
self::procLog(__METHOD__,$message,debug_backtrace(),$meta);
public static function error($message, $meta = '') {
self::procLog(__METHOD__, $message, debug_backtrace(), $meta);
}
/**
* debug log
* @param $message
* @param $meta
* @param mixed $meta
*/
public static function debug($message,$meta='') {
self::procLog(__METHOD__,$message,debug_backtrace(),$meta);
public static function debug($message, $meta = '') {
self::procLog(__METHOD__, $message, debug_backtrace(), $meta);
}
}
\ No newline at end of file
... ...