SIENTIAPDE-1199
Refactor logging levels in Ingestor and IngestorManager for improved clarity - Changed debug log statements to info level in Ingestor class for better visibility of subscription and management actions. - Updated log level for initializing OPC manager in IngestorManager to info for consistent logging practices.
This commit is contained in:
@@ -248,18 +248,18 @@ class Ingestor:
|
||||
|
||||
for slot, config in new_managed_tags.items():
|
||||
if slot not in old_managed_tags:
|
||||
self.logger.debug(f"Subscribing to new slot {slot}")
|
||||
self.logger.info(f"Subscribing to new slot {slot}")
|
||||
self.ingestor_manager.subscribe_to_tags({slot: config})
|
||||
continue
|
||||
|
||||
if config != old_managed_tags[slot]:
|
||||
self.logger.debug(f"Resubscribing to slot {slot}")
|
||||
self.logger.info(f"Resubscribing to slot {slot}")
|
||||
self.ingestor_manager.unsubscribe_slot(slot)
|
||||
self.ingestor_manager.subscribe_to_tags({slot: config})
|
||||
|
||||
for slot in old_managed_tags.keys():
|
||||
if slot not in new_managed_tags:
|
||||
self.logger.debug(f"Unsubscribing from slot {slot}")
|
||||
self.logger.info(f"Unsubscribing from slot {slot}")
|
||||
self.ingestor_manager.unsubscribe_slot(slot)
|
||||
|
||||
# Ensure the gauge is updated after any potential changes here
|
||||
@@ -302,14 +302,14 @@ class Ingestor:
|
||||
metrics.ACTIVE_INGESTORS.set(number_of_ingestors)
|
||||
|
||||
# Handle no slots
|
||||
self.logger.debug("Managing no slots...")
|
||||
self.logger.info("Managing no slots...")
|
||||
self.manage_no_slots(number_of_slots)
|
||||
|
||||
available_slots = number_of_slots - number_of_leases
|
||||
lacking_ingestors = number_of_slots - number_of_ingestors
|
||||
slot_diff = len(self.ingestor_manager.managed_tags) - 1
|
||||
|
||||
self.logger.debug("Managing leases...")
|
||||
self.logger.info("Managing leases...")
|
||||
self.manage_leases(available_slots, lacking_ingestors, slot_diff)
|
||||
|
||||
# Update managed slots gauge
|
||||
@@ -329,12 +329,12 @@ class Ingestor:
|
||||
self.logger.info("No slots acquired in this loop")
|
||||
|
||||
# Update opc servers
|
||||
self.logger.debug("Updating slot config...")
|
||||
self.logger.info("Updating slot config...")
|
||||
self.ingestor_manager.update_slot_config()
|
||||
|
||||
# Check OPC cycles
|
||||
self.logger.debug("Checking OPC servers integrity...")
|
||||
self.logger.info("Checking OPC servers integrity...")
|
||||
self.ingestor_manager.check_opc_servers_integrity()
|
||||
|
||||
self.logger.debug("Updating managed tags...")
|
||||
self.logger.info("Updating managed tags...")
|
||||
self.update_ingestor_manager(current_managed_tags)
|
||||
|
||||
@@ -153,7 +153,7 @@ class IngestorManager(BaseActivity):
|
||||
server_config.pop('tags', None)
|
||||
server_instance = self.opc_managers.get(server, None)
|
||||
if server_instance is None:
|
||||
self.logger.debug(
|
||||
self.logger.info(
|
||||
f"Initializing OPC manager for server {server}"
|
||||
)
|
||||
server_instance = self.initialize_opc_from_config(
|
||||
|
||||
Reference in New Issue
Block a user