Skip to content

RediStack 1.0.0 Alpha 7

Pre-release
Pre-release
Compare
Choose a tag to compare
@Mordil Mordil released this 14 Dec 00:05
· 152 commits to master since this release

API Docs are always available at docs.redistack.info

All changes made in this tag were from Merge Request !92.

Logging is now more dynamic - as RedisClient loggers can be changed, rather than being static at initialization.

This is particularly useful for attaching metadata from a logger you already have, so you can correlate the logs generated by RediStack.

For example:

let connection = RedisConnection.connect(...)
let response = connection
    .logging(to: myRequestLogger) // this logger has a `requestID` metadata element
    .ping() // logs from RedisConnection while fulfilling this command will also include the `requestID` metadata
    .wait()

Major

  • RedisClient has 2 new requirements:
    • logger: Logging.Logger readonly property
    • setLogging(to: Logging.Logger) method
  • RedisCommandHandler no longer supports logging
    • The init method has been changed to no longer accept a Logger
  • RedisMessageEncoder no longer supports logging
    • The init method has been changed to just an empty init
  • The exact timing of when certain logs and metrics has been tweaked slightly in the RedisConnection.init method

Minor

  • RedisClient has a default extension method logging(to:) that is chainable and calls setLogging(to:)
  • RedisConnection now has a public id: UUID property
  • RedisConnection has more trace logs
  • Some RedisConnection debug logs re-adjusted to trace
  • Some RedisConnection logs had their level increased to account for being the sole source of logs now

Patch

  • The RedisConnection metadata id value is now correctly stable.
  • Corrected some code documentation, specifically around logging.