blockscout icon indicating copy to clipboard operation
blockscout copied to clipboard

prevent logger from truncating response from rust verifier service in case of an error

Open fullkomnun opened this issue 2 years ago • 0 comments

Unsure if this qualifies as a bug fix since it fixes the logging..

Motivation

Error responses received from rust verifier service currently get truncated by the logger even though IO.inspect(error, limit: :infinity, printable_limit: :infinity) is being used. I applied the following pattern that saves the original logger's 'truncate', sets it to ':infinity' for logging the response, then restores it as done in apps/explorer/lib/explorer/repo.ex.

Changelog

  • Prevent logger from truncating response from rust verifier service in case of an error

Checklist for your Pull Request (PR)

  • [x] I added an entry to CHANGELOG.md with this PR
  • [ ] If I added new functionality, I added tests covering it.
  • [ ] If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
  • [ ] I checked whether I should update the docs and did so by submitting a PR to https://github.com/blockscout/docs
  • [ ] If I added/changed/removed ENV var, I submitted a PR to https://github.com/blockscout/docs to update the list of env vars at https://github.com/blockscout/docs/blob/master/for-developers/information-and-settings/env-variables.md and I updated the version to master in the Version column. Changes will be reflected in this table: https://docs.blockscout.com/for-developers/information-and-settings/env-variables.
  • [ ] If I add new indices into DB, I checked, that they are not redundant with PGHero or other tools

fullkomnun avatar Sep 18 '22 19:09 fullkomnun