Timber v2.8.1 Timber.LocalContext View Source

Manages Timber context through the Elixir.Logger metadata

This module stores context in the Elixir.Logger metadata, so any context is specific to the process.

For more details about the context data structure, see Timber.Context.

Link to this section Summary

Functions

Merges the provided context into the existing context

Dumps the context to a Context.t

Sets the provided context, overriding any existing Context

Removes the key from the existing local context

Link to this section Functions

Merges the provided context into the existing context

Timber.Context.add/2 is called to merge the existing context with the provided context.

Dumps the context to a Context.t

This function is used to expose the current context, which is useful if you need to copy the context to a different process.

Sets the provided context, overriding any existing Context

Link to this function remove_key(key) View Source
remove_key(atom) :: :ok

Removes the key from the existing local context.

Timber.Context.remove_key/2 is called to delete the key.