Timber v3.1.2 Timber.Contexts.CustomContext View Source
DEPRECATED
The Timber.Contexts.CustomContext
module is deprecated in favor of using simple maps:
Timber.add_context(build: %{version: "1.0.0"})
If you'd like, you can define your contexts as structs and implement the Timber.Contextable
protocol:
defmodule BuildContext do
defstruct [:version]
defimpl Timber.Contextable do
def to_context(context) do
map = Map.from_struct(context)
%{build: map}
end
end
end