bt2: honor self component or query log level when logging
authorPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 26 Jul 2019 18:56:31 +0000 (14:56 -0400)
committerJérémie Galarneau <jeremie.galarneau@efficios.com>
Wed, 7 Aug 2019 18:05:20 +0000 (14:05 -0400)
commit8d6ef9dfa268f6f31f5996e363cafb3a2005d862
tree230122f275c82abe7e06aa5bfa1fa372cdd3277a
parent3fa1b6a32830525df702234513c7fd6264f59bb8
bt2: honor self component or query log level when logging

This patch makes the Python bindings native code honor the self
component or query log level in log statements when possible.

The locations where this is not possible are:

* Registration of a BT component class pointer to a Python component
  class in global hash table.

* Lookup of a BT component class in global hash table.

* Module's destructor.

* Creation of a BT component class from the `_UserComponentType`
  metaclass.

* Trace and trace class destruction listeners.

* Graph's port added and ports connected listeners.

All those sites still use the module's
`bt_python_bindings_bt2_log_level` hidden symbol which is initialized
from the `BABELTRACE_PYTHON_BT2_LOG_LEVEL` environment variable at
construction time.

Signed-off-by: Philippe Proulx <eeppeliteloop@gmail.com>
Change-Id: I570f396c1d552b035e48269ce1f84e2e3044055c
Reviewed-on: https://review.lttng.org/c/babeltrace/+/1786
Tested-by: jenkins <jenkins@lttng.org>
src/bindings/python/bt2/bt2/native_bt_component_class.i
src/bindings/python/bt2/bt2/native_bt_graph.i
src/bindings/python/bt2/bt2/native_bt_trace.i
src/bindings/python/bt2/bt2/native_bt_trace_class.i
This page took 0.025276 seconds and 4 git commands to generate.