Timber v2.0.0-rc1 Timber.Context
The ContextEntry module formalizes the structure of context stack entries
Most users will not interact directly with this module and will instead use
the helper functions provided by the main Timber
module. See the Timber
module for more information.
The functions in this module work by modifying the Logger metadata store which is unique to every BEAM process. This is convenient in many ways. First and foremost, it does not require you to manually manage the metadata. Second, because we conform to the standard Logger principles, you can utilize Timber alongside other Logger backends without issue. Timber prefixes its contextual metadata keys so as not to interfere with other systems.
Summary
Functions
Takes an existing context element and inserts it into the global context
Types
t() :: %{optional(:custom) => Context.CustomContext.m, optional(:http) => Context.HTTPContext.m, optional(:organization) => Context.OrganizationContext.m, optional(:runtime) => Context.RuntimeContext.m, optional(:session) => Context.SessionContext.m, optional(:system) => Context.SystemContext.m, optional(:user) => Context.UserContext.m}
Functions
Takes an existing context element and inserts it into the global context.