Skip to content

Releases: valskalla/odin

Odin 0.13.0

18 Sep 18:50
c3ec9c5
Compare
Choose a tag to compare
  • Better interop with SLF4J loggers: SLF4J logger as a backend (#350). Cheers to @jarrodcodes
  • EnclosureLogger bug fix related to logging level (#342). Thanks to @janstenpickle

Odin 0.12.0

14 Jun 17:01
Compare
Choose a tag to compare

Finally, a long-overdue release of Odin for Scala 3 & Cats Effect 3.

Kudos to awesome contributors who are the authors of this release:

Odin 0.11.0

10 Feb 22:57
3778986
Compare
Choose a tag to compare

Significant Internal Refactoring

While API for our users stays the same, loggers now behave differently on logging level configuration. Before this version, Logger. withMinimalLevel was not consistent as it didn't propagate the logging level changes through the stack of loggers. That was a cause for various funky behaviors (See #240).

Now the call to logger.withMinimalLevel(Level.Info) will cause all underlying loggers (if any) to change their minimal level as well, which should have been an expected behavior.

Those users that built custom loggers on top of internal io.odin.loggers.DefaultLogger[F[_]] would need to adjust their implementation to account for level propagation.

Release 0.10.0

31 Jan 17:08
Compare
Choose a tag to compare

New Year, New Release:

  • File logger now creates corresponding directories for the target log file. See #229
  • File logger now provides a capability to override the default OpenOption set (which is CREATE & TRUNCATE)
  • Update a bunch of dependencies

Odin 0.9.1

08 Oct 16:40
7102768
Compare
Choose a tag to compare

Minor release:

  • Update dependencies
  • Provide explicit getName implementation for OdinLoggerAdapter in SLF4J bridge

Odin 0.9.0

21 Sep 14:28
29e3bfb
Compare
Choose a tag to compare

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)

Odin 0.8.1

13 Aug 11:18
a91e22c
Compare
Choose a tag to compare
  • Relax SLF4J adapter constraints from ConcurrentEffect with Timer to Effect with Clock (See #170)

Odin 0.8.0

12 Aug 08:55
3106242
Compare
Choose a tag to compare

Odin 0.7.0

23 Feb 11:11
01cdba3
Compare
Choose a tag to compare

This release brings a new and shiny rolling file logger, as well as a couple of useful Formatter settings.

Rolling file logger (#92)

A new logger that supports good ol' log files rollover:

def rollingFileLogger[F[_]: Concurrent: Timer: ContextShift](
      fileNamePattern: LocalDateTime => String,
      rolloverInterval: Option[FiniteDuration],
      maxFileSizeInBytes: Option[Long],
      formatter: Formatter = Formatter.default,
      minLevel: Level = Level.Trace
  ): Resource[F, Logger[F]]

Use a helpful file interpolator to construct fileNamePattern argument:

import io.odin.config._

val fileNamePattern = file"/var/log/$year-$month-$day-$hour-$minute-$second.log"

Async version is available as well. Check out the documentation for details.

Customized position and context format (#90 & #94)

Thanks to @iRevive and @CharlesD91 for adding a couple of useful settings for Formatter.create factory that allows controlling position and context render.

Again, check out the documentation for details

Odin 0.6.1

31 Jan 21:02
f3cca64
Compare
Choose a tag to compare

Bugfix release

  • Regression in enclosure & class routing ignored the minimal log level configured for routed and fallback loggers. Reported in #84 and fixed in #85