Skip to content

[WIP] ADD response payload to log info#4754

Open
fgalan wants to merge 1 commit intomasterfrom
hardening/add-response-payload-to-log
Open

[WIP] ADD response payload to log info#4754
fgalan wants to merge 1 commit intomasterfrom
hardening/add-response-payload-to-log

Conversation

@fgalan
Copy link
Member

@fgalan fgalan commented Mar 5, 2026

Edit: issue #4756

We need to use ciP->answer in all cases to make that information available in the requestComplete() function

As consecuence restReply() now uses uniquely ciP as argument (not sure if I like this change... but it's the easy way)

  • CNR
  • log.md (maybe)
  • .test covering the functionality

@fgalan
Copy link
Member Author

fgalan commented Mar 5, 2026

Example trace:

time=2026-03-05T13:47:54.053Z | lvl=INFO | corr=e8d4a03e-1899-11f1-aee7-080027207a9f | trans=1772718473-186-00000000005 | from=0.0.0.0 | srv= | subsrv= | comp=Orion | op=logTracing.cpp[208]:logInfoRequestWithPayload | msg=Request received: POST /v2/entities/E/attrs?options=append, request payload (80 bytes): { "B": { "value": 1, "type": "Number" }, "C": { "value": 1, "type": "Number" } }, response code: 422, response payload (111 bytes): {"error":"PartialUpdate","description":"one or more of the attributes in the request already exist: E - [ B ]"}

@fgalan
Copy link
Member Author

fgalan commented Mar 5, 2026

Only for error responses (i.e. 2xx as they are know)

CC: @mapedraza @rg2011

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant