hyperledger-iroha / iroha

Iroha - A simple, enterprise-grade decentralized ledger
https://wiki.hyperledger.org/display/iroha
Apache License 2.0
438 stars 280 forks source link

Poor Torii logging on bad transactions/queries #4975

Open 0x009922 opened 2 months ago

0x009922 commented 2 months ago

Steps to reproduce

Expected

To see some information on the response's rejection reason

Actual

Actual logs do not contain anything except basic request/response information.

JSON logs ```json [ { "timestamp": "2024-08-13T23:27:28.113487Z", "level": "DEBUG", "fields": { "message": "started processing request" }, "target": "tower_http::trace::on_request", "span": { "headers": "{\"host\": \"localhost:8080\", \"connection\": \"keep-alive\", \"accept\": \"*/*\", \"accept-language\": \"*\", \"sec-fetch-mode\": \"cors\", \"user-agent\": \"node\", \"accept-encoding\": \"gzip, deflate\", \"content-length\": \"137\"}", "method": "POST", "uri": "/transaction", "version": "HTTP/1.1", "name": "request" }, "spans": [ { "headers": "{\"host\": \"localhost:8080\", \"connection\": \"keep-alive\", \"accept\": \"*/*\", \"accept-language\": \"*\", \"sec-fetch-mode\": \"cors\", \"user-agent\": \"node\", \"accept-encoding\": \"gzip, deflate\", \"content-length\": \"137\"}", "method": "POST", "uri": "/transaction", "version": "HTTP/1.1", "name": "request" } ] }, { "timestamp": "2024-08-13T23:27:28.113646Z", "level": "DEBUG", "fields": { "message": "finished processing request", "latency": "0 ms", "status": 400 }, "target": "tower_http::trace::on_response", "span": { "headers": "{\"host\": \"localhost:8080\", \"connection\": \"keep-alive\", \"accept\": \"*/*\", \"accept-language\": \"*\", \"sec-fetch-mode\": \"cors\", \"user-agent\": \"node\", \"accept-encoding\": \"gzip, deflate\", \"content-length\": \"137\"}", "method": "POST", "uri": "/transaction", "version": "HTTP/1.1", "name": "request" }, "spans": [ { "headers": "{\"host\": \"localhost:8080\", \"connection\": \"keep-alive\", \"accept\": \"*/*\", \"accept-language\": \"*\", \"sec-fetch-mode\": \"cors\", \"user-agent\": \"node\", \"accept-encoding\": \"gzip, deflate\", \"content-length\": \"137\"}", "method": "POST", "uri": "/transaction", "version": "HTTP/1.1", "name": "request" } ] } ] ```