Skip to content

Draft: [#647] Add structured logging

Description

One very desired feature - log arbitrary stuff during contract execution, and later assert that in tests. This MR implements this feature.

  • Do something with the failing tests - currently, we lose PRINT_STRUCTURED during conversions to untyped contract.
    • Add the new instruction to untyped AbstractInstr (and extract logging stuff to a separate module)? Probably we need this for the debugger in either way.
    • Or avoid untype/typecheck roundtrip in the test framework? Waiting for #576 (closed).
  • Update test primitives after #461 (closed) is done.
  • Move the tests to a dedicated module - after !924 (merged) is merged.

Related issue(s)

Resolves #647

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • 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.
  • Documentation

    • I checked whether I should update the docs and did so if necessary:
    • I updated changelog files of all affected packages released to Hackage if my changes are externally visible.

Stylistic guide (mandatory)

Edited by Konstantin Ivanov

Merge request reports

Loading