Skip to content

[#184] Improve logging in morley-client

Ivan Gromakovskii requested to merge gromak/#184-morley-client-logging into master

Description

Problem: we have our own ad-hoc class for logging in morley-client. It supports only one logging severity, but at this point we want more. Fortunately, there are many logging libraries with desired functionality.

Solution: use co-log package, it seems to perfectly fit our needs and it's well maintained. We replace HasCli class with co-log's WithLogger env Message. We create a tiny abstraction layer to make code more resistant to possible changes in logging (in our code or upstream).

Apart from that I refine and add new logging messages. Including logging of servant-client requests and responses.

Related issue(s)

Resolves #184 (closed)

Checklist for your Merge Request

Related changes (conditional)

  • Tests (see short guidelines)

    • If I added new functionality, I added tests covering it ← didn't add because testing logging is hard and is not worth it. Only tested manually.
    • 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 Ivan Gromakovskii

Merge request reports