src/Log.php
public function append($level, $route = '', $uid = '', $code = 0, $msg = '', $ext = '')
    {
        if (is_array($ext)) {
            $ext = json_encode($ext, JSON_UNESCAPED_UNICODE);
        } else if (!is_string($ext)) {
            $ext = '';
        }
        $funcName = 'addInfo';
        switch ($level) {
            case 'DEBUG':
                $funcName = 'addDebug';
                break;
            case 'INFO':
                $funcName = 'addInfo';
                break;
            case 'WARN':
                $funcName = 'addWarning';
                break;
            case 'ERROR':
                $funcName = 'addError';
                break;
            case 'FATAL':
                $funcName = 'addEmergency';
                break;
        }
        $this->_logger->$funcName($ext, [
            'datetime' => date('Y-m-d H:i:s'),
            'ip' => self::requestIp(),
            'level' => $level,
            'ruid' => self::getGlobalRequestId(),
            'app' => self::$_app,
            'pid' => getmygid(),
            'route' => $route,
            'uid' => $uid,
            'code' => $code,
            'msg' => $msg
        ]);
    }
public function append($level, $route = '', $uid = '', $code = 0, $msg = '', $ext = '')
    {
        if (is_array($ext)) {
            $ext = json_encode($ext, JSON_UNESCAPED_UNICODE);
        } else if (!is_string($ext)) {
            $ext = '';
        }
        $funcName = 'addInfo';
        switch ($level) {
            case 'DEBUG':
                $funcName = 'addDebug';
                break;
            case 'INFO':
                $funcName = 'addInfo';
                break;
            case 'WARN':
                $funcName = 'addWarning';
                break;
            case 'ERROR':
                $funcName = 'addError';
                break;
            case 'FATAL':
                $funcName = 'addEmergency';
                break;
        }
        $this->_logger->$funcName($ext, [
            'datetime' => date('Y-m-d H:i:s'),
            'ip' => self::requestIp(),
            'level' => $level,
            'ruid' => self::getGlobalRequestId(),
            'app' => self::$_app,
            'pid' => getmygid(),
            'route' => $route,
            'uid' => $uid,
            'code' => $code,
            'msg' => $msg
        ]);
    }
log append
@param $level
@param string $route
@param string $uid
@param int $code
@param string $msg
@param string $ext