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)
committerPhilippe Proulx <eeppeliteloop@gmail.com>
Fri, 26 Jul 2019 23:19:09 +0000 (19:19 -0400)
commit12cd44903163531e12412edde3fb41ea7245c91f
tree0250da198c248eae4fa7a15c7ee4d8eb2f02245c
parentd9c39b0a4ad9517178899334c0ca89fd20901609
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.025211 seconds and 4 git commands to generate.