Releases: valskalla/odin
Odin 0.13.0
- 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
Odin 0.11.0
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
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 isCREATE
&TRUNCATE
) - Update a bunch of dependencies
Odin 0.9.1
Minor release:
- Update dependencies
- Provide explicit
getName
implementation forOdinLoggerAdapter
in SLF4J bridge
Odin 0.9.0
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:
Odin 0.8.1
- Relax SLF4J adapter constraints from
ConcurrentEffect with Timer
toEffect with Clock
(See #170)
Odin 0.8.0
- Update dependencies to their latest versions
- Fix
Noop
level priority (#98 by @CharlesD91) - Add stack trace filter during formatting (#144 by @lightning95). Check out this example
Odin 0.7.0
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