lenskit.logging.Tracer ====================== .. py:class:: lenskit.logging.Tracer(logger) :canonical: lenskit.logging._tracing.Tracer Logger-like thing that is only for TRACE-level events. This class is designed to support structured tracing without the overhead of creating and binding new loggers. It is also imperative, rather than functional, so we create fewer objects and so it is a little more ergonomic for common tracing flows. .. note:: Don't create instances of this class directly — use :func:`~lenskit.logging.get_tracer` to create a tracer. :Stability: Experimental .. py:method:: add_bindings(**new_values) Bind new data in the keys. .. note:: Unlike :meth:`structlog.Logger.bind`, this method is **imperative*: it updates the tracer in-place instead of returning a new tracer. If you need a new, disconnected tracer, use :meth:`split`. .. py:method:: remove_bindings(*keys) Unbind keys in the tracer. .. note:: Unlike :meth:`structlog.Logger.bind`, this method is **imperative*: it updates the tracer in-place instead of returning a new tracer. If you need a new, disconnected tracer, use :meth:`split`. .. py:method:: reset() Reset this tracer's underlying logger to the original logger. .. py:method:: trace(event, *args, **bindings) Emit a TRACE-level event.