lib: set component's initial log level when adding it to the graph
[babeltrace.git] / src / bindings / python / bt2 / bt2 / component.py
index 3480f6570703e2ae49db6c0a99d62daabf89b0a7..13c51bf8badfbe66e5ec0290fe6efab2ae02bbc4 100644 (file)
@@ -184,6 +184,11 @@ class _Component:
         assert name is not None
         return name
 
+    @property
+    def logging_level(self):
+        ptr = self._as_component_ptr(self._ptr)
+        return native_bt.component_get_logging_level(ptr)
+
     @property
     def cls(self):
         cc_ptr = self._borrow_component_class_ptr(self._ptr)
@@ -575,6 +580,12 @@ class _UserComponent(metaclass=_UserComponentType):
         assert name is not None
         return name
 
+    @property
+    def logging_level(self):
+        ptr = self._as_not_self_specific_component_ptr(self._ptr)
+        ptr = self._as_component_ptr(ptr)
+        return native_bt.component_get_logging_level(ptr)
+
     @property
     def cls(self):
         comp_ptr = self._as_not_self_specific_component_ptr(self._ptr)
This page took 0.024039 seconds and 4 git commands to generate.