io.pedestal.interceptor.chain.debug

added in 0.7.0

Tools to help debug interceptor chain execution.

debug-observer

(debug-observer)(debug-observer options)

Returns an observer function that logs, at debug level, the interceptor name, stage, execution id, and a description of context changes.

The context changes are in the form of a map. The :added key is a map of key path to added values. The :removed key is a map of key path to removed values. The :changed key is a map of key path to a value change, a map of :from and :to.

Options map:

Key Type Description
:omit set or function Identifies key paths, as vectors, to omit in the description.
:changes-only? boolean If true, then log only when the context changes.
:tap? boolean If true, the data is sent to tap> rather than logged.

The :omit option is used to prevent certain key paths from appearing in the result delta; the value for these is replaced with .... It is typically a set, but can also be a function that accepts a key path vector. It is commonly used to omit large, insecure values such as [:response :body].