This repository was archived by the owner on Dec 8, 2020. It is now read-only.
2.7.0 - 2018-03-22
Added
Timber.add_context/2now allows you to set context either locally or globally;
Timber.add_context/1will default to storing the context locally (consistent
with previous versions of the library)- The
Timber.LocalContextnow manages setting and updating the Timber context
maintained in the Elixir Logger metadata. This replaces theTimber.CurrentContext
module.Timber.LocalContext.get/0should be used where
Timber.CurrentContext.load/0was used before, andTimber.LocalContext.put/1
should be used whereTimber.CurrentContext.save/1was used.
Changed
Timber.LogEntry.new/4will fetch the global context and merge it into the
local metadata context. The local context will override the global context
based on the rules forTimber.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.CurrentContexthas been deprecated in favor ofTimber.LocalContext;
the new name better reflects the purpose of the module. Use of
Timber.CurrentContextwill 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