DiscoLog.Context (disco_log v2.0.0-rc.0)

View Source

Context is a map of any terms that DiscoLog attaches to reported occurrences. The context is stored in Logger module metadata.

Using context

DiscoLog.Context is mostly used by DiscoLog itself, but you might find it useful if you want to add metadata to occurrences and not normal log messages. Context is always exported, regardless of the :metadata configuration option.

Summary

Functions

Obtain the context of the current process.

Set context for the current process.

Types

t()

@type t() :: map()

Functions

get()

Obtain the context of the current process.

set(key, value)

Set context for the current process.