pub struct PyTracingHandler { /* private fields */ }
Expand description
Modifies the Python logging
module to deliver its log messages using tracing::Subscriber events.
To achieve this goal, the following changes are made to the module:
- A new builtin function
logging.py_tracing_event
transcodeslogging.LogRecord
s totracing::Event
s. This function is not exported inlogging.__all__
, as it is not intended to be called directly. - A new class
logging.TracingHandler
provides alogging.Handler
that delivers all records topython_tracing
.
Trait Implementations
sourceimpl Debug for PyTracingHandler
impl Debug for PyTracingHandler
sourceimpl IntoPy<Py<PyAny>> for PyTracingHandler
impl IntoPy<Py<PyAny>> for PyTracingHandler
sourceimpl PyClass for PyTracingHandler
impl PyClass for PyTracingHandler
type Dict = PyClassDummySlot
type Dict = PyClassDummySlot
Specify this class has
#[pyclass(dict)]
or not.type WeakRef = PyClassDummySlot
type WeakRef = PyClassDummySlot
Specify this class has
#[pyclass(weakref)]
or not.type BaseNativeType = PyAny
type BaseNativeType = PyAny
The closest native ancestor. This is
PyAny
by default, and when you declare
#[pyclass(extends=PyDict)]
, it’s PyDict
. Read moresourceimpl PyClassImpl for PyTracingHandler
impl PyClassImpl for PyTracingHandler
sourceconst IS_BASETYPE: bool = false
const IS_BASETYPE: bool = false
#[pyclass(subclass)]
sourceconst IS_SUBCLASS: bool = false
const IS_SUBCLASS: bool = false
#[pyclass(extends=…)]
sourceconst IS_MAPPING: bool = false
const IS_MAPPING: bool = false
#[pyclass(mapping)]
type Layout = PyCell<PyTracingHandler>
type Layout = PyCell<PyTracingHandler>
Layout
type ThreadChecker = ThreadCheckerStub<PyTracingHandler>
type ThreadChecker = ThreadCheckerStub<PyTracingHandler>
This handles following two situations: Read more
fn for_all_items(visitor: &mut dyn FnMut(&PyClassItems))
fn dict_offset() -> Option<isize>
fn weaklist_offset() -> Option<isize>
sourceimpl PyMethods<PyTracingHandler> for PyClassImplCollector<PyTracingHandler>
impl PyMethods<PyTracingHandler> for PyClassImplCollector<PyTracingHandler>
fn py_methods(self) -> &'static PyClassItems
sourceimpl PyTypeInfo for PyTracingHandler
impl PyTypeInfo for PyTracingHandler
type AsRefTarget = PyCell<PyTracingHandler>
type AsRefTarget = PyCell<PyTracingHandler>
Utility type to make Py::as_ref work.
sourcefn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
fn type_object_raw(py: Python<'_>) -> *mut PyTypeObject
PyTypeObject instance for this type.
sourcefn is_type_of(object: &PyAny) -> bool
fn is_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type or a subclass of this type.sourcefn is_exact_type_of(object: &PyAny) -> bool
fn is_exact_type_of(object: &PyAny) -> bool
Checks if
object
is an instance of this type.Auto Trait Implementations
impl !RefUnwindSafe for PyTracingHandler
impl Send for PyTracingHandler
impl Sync for PyTracingHandler
impl Unpin for PyTracingHandler
impl !UnwindSafe for PyTracingHandler
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
sourcefn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
sourceimpl<T> PyTypeObject for Twhere
T: PyTypeInfo,
impl<T> PyTypeObject for Twhere
T: PyTypeInfo,
sourcefn type_object(py: Python<'_>) -> &PyType
fn type_object(py: Python<'_>) -> &PyType
Returns the safe abstraction over the type object.