Skip to content

Odin 0.9.0

Compare
Choose a tag to compare
@sergeykolbasov sergeykolbasov released this 21 Sep 14:28
· 85 commits to master since this release
29e3bfb

Binary Compatibility

This release breaks a bincompat with the previous versions due to bincompat break in the latest stable release of cats-mtl dependency. It affects only users of context-rich effects.

Secret Context

On the positive side, there is now a syntax to hash & hide context keys from the logs to prevent sensitive information leakage:

import io.odin.syntax._

consoleLogger[IO]()
    .withSecretContext("password")
    .info("Hello, username", Map("password" -> "qwerty"))
    .unsafeRunSync() //rendered context contains first 6 symbols of SHA-1 hash of password
// 2020-09-21T14:30:24,388 [run-main-0] INFO repl.MdocSession.App#res14:277 - Hello, username - password: secret:b1b377

Check documentation for more details.

Cats-Effect 2.2.0

Another quality of life improvement comes with the release of cats-effect 2.2.0. A lot of loggers now have more relaxed implicit requirement, asking for Clock instead of Timer.

Complete list of changes:

  • Secret syntax (#184)
  • Update cats-effect to 2.2.0 and relax Timer condition (#183)
  • Update cats-mtl to 1.0.0 (#185 thanks to @iRevive)
  • Stacktrace writing optimization (#178 thanks to @lightning95)