Changeset 86681 in vbox for trunk/src/VBox/Runtime/common/rest
- Timestamp:
- Oct 22, 2020 11:36:16 PM (4 years ago)
- Location:
- trunk/src/VBox/Runtime/common/rest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/rest/RTCRestClientRequestBase.cpp
r82968 r86681 34 34 #include <iprt/assert.h> 35 35 #include <iprt/err.h> 36 #include <iprt/log.h> 36 37 #include <iprt/cpp/restarray.h> 37 38 #include <iprt/cpp/reststringmap.h> … … 100 101 VERR_INTERNAL_ERROR_3); 101 102 AssertMsgReturn(a_paPathParamStates[i].pObj != NULL, 102 ("Path parameter '%s' is not set!\n", a_paPathParams[i].pszName), 103 ("%s: Path parameter '%s' is not set!\n", 104 getOperationName(), a_paPathParams[i].pszName), 103 105 VERR_REST_PATH_PARAMETER_NOT_SET); 104 106 AssertMsgReturn(m_fIsSet & RT_BIT_64(a_paPathParams[i].iBitNo), 105 ("Path parameter '%s' is not set!\n", a_paPathParams[i].pszName), 107 ("%s: Path parameter '%s' is not set!\n", 108 getOperationName(), a_paPathParams[i].pszName), 106 109 VERR_REST_PATH_PARAMETER_NOT_SET); 107 110 … … 109 112 rc = a_paPathParamStates[i].pObj->toString(&strPathParam, a_paPathParams[i].fFlags); 110 113 AssertRCReturn(rc, rc); 114 115 LogRel5(("> %s: /%s = %s\n", 116 getOperationName(), a_paPathParams[i].pszName, strPathParam.c_str())); 111 117 112 118 RTCString strTmpVal; … … 141 147 { 142 148 AssertMsgReturn(a_papQueryParamObjs[i] != NULL, 143 ("Required query parameter '%s' is not set!\n", a_paQueryParams[i].pszName), 149 ("%s: Required query parameter '%s' is not set!\n", 150 getOperationName(), a_paQueryParams[i].pszName), 144 151 VERR_REST_REQUIRED_QUERY_PARAMETER_NOT_SET); 145 152 AssertMsgReturn(m_fIsSet & RT_BIT_64(a_paQueryParams[i].iBitNo), 146 ("Required query parameter '%s' is not set!\n", a_paQueryParams[i].pszName), 153 ("%s: Required query parameter '%s' is not set!\n", 154 getOperationName(), a_paQueryParams[i].pszName), 147 155 VERR_REST_REQUIRED_QUERY_PARAMETER_NOT_SET); 148 156 … … 155 163 rc = a_pStrQuery->appendPrintfNoThrow("%c%RMpa=%RMpa", chSep, a_paQueryParams[i].pszName, strTmpVal.c_str()); 156 164 AssertRCReturn(rc, rc); 165 166 LogRel5(("> %s: ?%s = %s\n", 167 getOperationName(), a_paQueryParams[i].pszName, strTmpVal.c_str())); 157 168 158 169 chSep = '&'; … … 175 186 AssertRCReturn(rc, rc); 176 187 188 LogRel5(("> %s: ?%s[%d] = %s\n", 189 getOperationName(), a_paQueryParams[i].pszName, j, strTmpVal.c_str())); 190 177 191 chSep = '&'; 178 192 } … … 198 212 { 199 213 AssertMsgReturn(m_fIsSet & RT_BIT_64(a_paHeaderParams[i].iBitNo), 200 ("Required header parameter '%s' is not set!\n", a_paHeaderParams[i].pszName), 214 ("%s: Required header parameter '%s' is not set!\n", 215 getOperationName(), a_paHeaderParams[i].pszName), 201 216 VERR_REST_REQUIRED_HEADER_PARAMETER_NOT_SET); 202 217 AssertMsgReturn(a_papHeaderParamObjs[i] != NULL, 203 ("Required header parameter '%s' is not set!\n", a_paHeaderParams[i].pszName), 218 ("Required header parameter '%s' is not set!\n", 219 getOperationName(), a_paHeaderParams[i].pszName), 204 220 VERR_REST_REQUIRED_HEADER_PARAMETER_NOT_SET); 205 221 … … 212 228 RTHTTPADDHDR_F_BACK); 213 229 AssertRCReturn(rc, rc); 230 231 LogRel5(("> %s: :%s = %s\n", 232 getOperationName(), a_paHeaderParams[i].pszName, strTmpVal.c_str())); 214 233 } 215 234 else if (!a_papHeaderParamObjs[i]->isNull()) … … 238 257 RTHTTPADDHDR_F_BACK); 239 258 AssertRCReturn(rc, rc); 259 260 LogRel5(("> %s: :%s = %s\n", 261 getOperationName(), strTmpName.c_str(), strTmpVal.c_str())); 240 262 } 241 263 } -
trunk/src/VBox/Runtime/common/rest/RTCRestClientResponseBase.cpp
r82968 r86681 34 34 #include <iprt/ctype.h> 35 35 #include <iprt/err.h> 36 #include <iprt/log.h> 36 37 #include <iprt/cpp/reststringmap.h> 37 38 … … 255 256 if (RT_SUCCESS(rc)) 256 257 { 258 LogRel7(("< %s: :%s = %s\n", 259 getOperationName(), a_pszErrorTag, strValue.c_str())); 260 257 261 /* 258 262 * Try deserialize it. … … 270 274 else 271 275 { 272 addError(rc, "Error %Rrc validating value necoding of header field '%s': %.*Rhxs",276 addError(rc, "Error %Rrc validating value encoding of header field '%s': %.*Rhxs", 273 277 rc, a_pszErrorTag, a_cchValue, a_pchValue); 274 278 rc = VINF_SUCCESS; /* ignore */ … … 303 307 if (RT_SUCCESS(rc)) 304 308 { 309 LogRel7(("< %s: :%s%.*s = %s\n", 310 getOperationName(), a_pszErrorTag, a_cchField, a_pchField, strValue.c_str())); 311 305 312 /* 306 313 * Try deserialize the value. … … 343 350 if (RT_SUCCESS(rc)) 344 351 { 352 if (LogRelIs7Enabled()) 353 { 354 /* skip m_ or m_p prefix */ 355 const char *pszName = a_pszBodyName; 356 if (pszName[0] == 'm' && pszName[1] == '_') 357 { 358 if (pszName[2] == 'p') 359 pszName += 3; 360 else 361 pszName += 2; 362 } 363 364 LogRel7(("< %s: %d: %s = %.*s\n", 365 getOperationName(), m_rcHttp, pszName, a_cbData, a_pchData)); 366 } 367 345 368 RTERRINFOSTATIC ErrInfo; 346 369 RTJSONVAL hValue;
Note:
See TracChangeset
for help on using the changeset viewer.