public function pushLog($key, $val = '', $length = null)
    {
        if (!(is_string($key) || is_numeric($key))) {
            return;
        }
        $key = urlencode($key);
        if (is_array($val)) {
            if ($length) {
                $val = $this->substrLog($val, $length);
            }
            $this->_pushlogs[] = "$key=" . json_encode($val);
        } elseif (is_bool($val)) {
            $this->_pushlogs[] = "$key=" . var_export($val, true);
        } elseif (is_string($val) || is_numeric($val)) {
            if ($length && is_string($val) && strlen($val) > $length) {
                $val = $this->substrLog($val, $length);
            }
            $this->_pushlogs[] = "$key=" . urlencode($val);
        } elseif (is_null($val)) {
            $this->_pushlogs[] = "$key=";
        }
    }
public function pushLog($key, $val = '', $length = null)
    {
        if (!(is_string($key) || is_numeric($key))) {
            return;
        }
        $key = urlencode($key);
        if (is_array($val)) {
            if ($length) {
                $val = $this->substrLog($val, $length);
            }
            $this->_pushlogs[] = "$key=" . json_encode($val);
        } elseif (is_bool($val)) {
            $this->_pushlogs[] = "$key=" . var_export($val, true);
        } elseif (is_string($val) || is_numeric($val)) {
            if ($length && is_string($val) && strlen($val) > $length) {
                $val = $this->substrLog($val, $length);
            }
            $this->_pushlogs[] = "$key=" . urlencode($val);
        } elseif (is_null($val)) {
            $this->_pushlogs[] = "$key=";
        }
    }
public function pushLog ( $ key , $ val = '' , $ length = null ) { if ( ! ( is_string ( $ key ) || is_numeric ( $ key ) ) ) { return ; } $ key = urlencode ( $ key ) ; if ( is_array ( $ val ) ) { if ( $ length ) { $ val = $ this -> substrLog ( $ val , $ length ) ; } $ this -> _pushlogs [ ] = "$key=" . json_encode ( $ val ) ; } elseif ( is_bool ( $ val ) ) { $ this -> _pushlogs [ ] = "$key=" . var_export ( $ val , true ) ; } elseif ( is_string ( $ val ) || is_numeric ( $ val ) ) { if ( $ length && is_string ( $ val ) && strlen ( $ val ) > $ length ) { $ val = $ this -> substrLog ( $ val , $ length ) ; } $ this -> _pushlogs [ ] = "$key=" . urlencode ( $ val ) ; } elseif ( is_null ( $ val ) ) { $ this -> _pushlogs [ ] = "$key=" ; } }
for info level log only
@param string|number $key
@param string $val
@param int $length 字符串类型值最大长度【截取时仅对字符串类型值有效】，数组会进行递归处理
for info level log only