🌲 Great Elixir logging made easy
Timber.InvalidAPIKeyError
is now Timber.Errors.InvalidAPIKeyError
event
key.event.custom
key, they have simply been moved
to the root of the document.context.custom
key, they have simply been
moved to the root of the document.$schema
key since Timber 2.0
does not strictly require a schema anymore.Timber.Events.*
and Timber.Contexts.*
structs have been deprecated in favor of
simple maps since Timber 2.0 no longer requires a strict schema. Module docs for each
module has been updated accordingly.:timber_exceptions
library if you'd
like to structure errors. This is a proper approach to structuring these events.msgpax
1.x is no longer supportedTimber.LoggerBackends.HTTP.TimberAPIKeyInvalid
is now Timber.InvalidAPIKeyError
:timber_phoenix
package instead:timber_plug
package instead:timber_ecto
package instead:error_logger
; use the
:timber_exceptions
package
insteadmix timber.install
); manual installation is now
expected:logger
and :timber
and made Logger calls. This was because the ETS table holding the cache had not been started by Timber yet. To fix this, the hostname is now cached in the application environment which is guaranteed to be available by that point.Special thanks in this release to @mitchellhenke for his work on the :error_logger
integration!
Timber.Integrations.ErrorLogger
allows you to include a new OTP :error\_logger
handler to better maintain the structure of errors and stacktraces. It also collapses many cases of multi-line logs into a single line.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)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.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
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 v2Fixed an error where Timber.Integrations.PhoenixInstrumenter
would fail on versions of Phoenix prior to 1.3 that do not pass a :conn
key with the phoenix_controller_render/3
:start
event.
Fixed Timber.Integrations.PhoenixInstrumenter
did not define a fall-through for phoenix_controller_render/3
during the :start
event for when the third-parameter is in a different format than expected.
Fixed Timber.Integrations.PhoenixInstrumenter
did not define a fall-through when the instrumentation system sends a default state value for the :stop
event on phoenix_controller_render/3
.