Timber v2.5.4 Timber.Integrations.SessionContextPlug View Source
Automatically tracks the session in Plug-based frameworks like Phoenix and adds it to the context
The session context plug is only useful if you have session storage already setup. More information about this can be found in the documentation for the specific framework you’re using:
If you have chosen to not use sessions for your application, it’s best not to use this plug. Using this plug without properly setting up a session store can cause HTTP responses to fail.
Adding the Plug
Timber.Integrations.SessionContextPlug
can be added to your plug pipeline using the
standard Plug.Builder.plug/2
macro. Because it requires access to the session, it should
be listed after setting up the session store. The session store will usually be set up
using a call to plug Plug.Session
.
Link to this section Summary
Functions
Adds the Request ID to the Timber context data
Prepares the given options for use in a plug pipeline
Link to this section Functions
Adds the Request ID to the Timber context data
Prepares the given options for use in a plug pipeline
When the Plug.Builder.plug/2
macro is called, it will use this
function to prepare options. Any resulting options will be
passed on to the plug on every call. The options accepted
by this function are the same as defined by call/2
.