"").
Expand
Expand
click image to maximizeContext Handling
You can usewith unify.Context("..."): to create a context, and all logging inside this block will adopt this context.
Nested Contexts
These can also be arbitrarily nested, where each context string is joined via/ to define the full context path.
Expand
Expand
click image to maximizeRead and Write Modes
By default,unify.Context("...") also changes the behaviour of get_logs, returning only the logs relevant within the context.
unify.Context("...", mode="read") which will only set the context for log getting,
and unify.Context("...", mode="write") which will only set the context for log setting.
This makes it easy to quickly get/set different logs for different purposes throughout your codebase,
without needing to manage contexts via local variables.
Shared Logs
Logs can be added to as many contexts as you’d like, without duplication.Expand
Expand
click image to maximizeExtraSupport and Failed contexts are “disconnected”,
and therefore both sets of logs cannot be viewed in a single table.
To organize data hierarchically in a single table, you can use column contexts, more on those soon!