src/Log.php
public static function getGlobalRequestId()
    {
        if (!self::$_requestId) {
            try {
                if (isset($_GET[self::LOG_REQUEST_ID]) && $_GET[self::LOG_REQUEST_ID]) {
                    self::$_requestId = $_GET[self::LOG_REQUEST_ID];
                } else if (isset($_POST[self::LOG_REQUEST_ID]) && $_POST[self::LOG_REQUEST_ID]) {
                    self::$_requestId = $_POST[self::LOG_REQUEST_ID];
                } else {
                    self::$_requestId = uniqid();
                }
            } catch (Exception $e) {
                self::$_requestId = uniqid();
            }
        }
        return self::$_requestId;
    }
public static function getGlobalRequestId()
    {
        if (!self::$_requestId) {
            try {
                if (isset($_GET[self::LOG_REQUEST_ID]) && $_GET[self::LOG_REQUEST_ID]) {
                    self::$_requestId = $_GET[self::LOG_REQUEST_ID];
                } else if (isset($_POST[self::LOG_REQUEST_ID]) && $_POST[self::LOG_REQUEST_ID]) {
                    self::$_requestId = $_POST[self::LOG_REQUEST_ID];
                } else {
                    self::$_requestId = uniqid();
                }
            } catch (Exception $e) {
                self::$_requestId = uniqid();
            }
        }
        return self::$_requestId;
    }
获取全局唯一请求id.
如果未设置则从$_GET、$_POST参数中区搜索.
如果还未找到则直接创建.

@return string