示例#1
0
 def SetCentralLoggingLevel(self, element_devices_and_levels):
     CentralLoggingLevel = element_devices_and_levels[0][:]
     CentralLoggingDevice = element_devices_and_levels[1][:]
     i = 0
     while i < len(CentralLoggingLevel[:]):
         self.info_stream("%s,%s", CentralLoggingLevel[i],
                          CentralLoggingDevice[i])
         dev1 = DeviceProxy(CentralLoggingDevice[i])
         dev1.centralLoggingLevel = CentralLoggingLevel[i]
         property_names = [
             "logging_level",
             "logging_target",
         ]
         dev_properties = dev1.get_property(property_names)
         dev_properties["logging_level"] = ["DEBUG"]
         dev_properties["logging_target"].append(
             "device::central/cdev/cdev1")
         dev1.put_property(dev_properties)
         dev1.add_logging_target("device::central/cdev/cdev1")
         i += 1
 def SetElementLoggingLevel(self, element_devices_and_levels):
     ElementLoggingLevel = element_devices_and_levels[0][:]
     ElementLoggingDevice = element_devices_and_levels[1][:]
     i = 0
     while i < len(ElementLoggingLevel[:]):
         self.info_stream("%s,%s", ElementLoggingLevel[i],
                          ElementLoggingDevice[i])
         dev1 = DeviceProxy(ElementLoggingDevice[i])
         dev1.elementLoggingLevel = ElementLoggingLevel[i]
         property_names = [
             "logging_level",
             "logging_target",
         ]
         dev_properties = dev1.get_property(property_names)
         dev_properties["logging_level"] = ["DEBUG"]
         dev_properties["logging_target"].append(
             "device::ellogger/elem/elem1")
         dev1.put_property(dev_properties)
         dev1.add_logging_target("device::ellogger/elem/elem1")
         i += 1