Skip to content
This repository was archived by the owner on Dec 8, 2020. It is now read-only.

2.7.0 - 2018-03-22

Choose a tag to compare

@DavidAntaramian DavidAntaramian released this 22 Mar 23:03
· 72 commits to master since this release

Added

  • Timber.add_context/2 now allows you to set context either locally or globally;
    Timber.add_context/1 will default to storing the context locally (consistent
    with previous versions of the library)
  • The Timber.LocalContext now manages setting and updating the Timber context
    maintained in the Elixir Logger metadata. This replaces the Timber.CurrentContext
    module. Timber.LocalContext.get/0 should be used where
    Timber.CurrentContext.load/0 was used before, and Timber.LocalContext.put/1
    should be used where Timber.CurrentContext.save/1 was used.

Changed

  • Timber.LogEntry.new/4 will fetch the global context and merge it into the
    local metadata context. The local context will override the global context
    based on the rules for Timber.Context.merge/2
  • Phoenix Channels integration will now accept any channel message payload.
    (Previously, non-map types were dropped and replaced with an empty map.)

Deprecated

  • Timber.CurrentContext has been deprecated in favor of Timber.LocalContext;
    the new name better reflects the purpose of the module. Use of
    Timber.CurrentContext will still be supported for the lifetime of v2

Fixed

  • Phoenix Channels integration with Phoneix 1.3+ will no longer fail if the
    payload of a channel message is a list