From 48c67ec9fb7f1b0cb4a657daa9515b68c1f081c2 Mon Sep 17 00:00:00 2001 From: Brad House Date: Sun, 1 Dec 2024 11:28:34 -0500 Subject: [PATCH] [xcvrd] silence port update event warnings (PR #567) Warnings should only be used to alert an administrator that something could cause issues. Typically warnings will be evaluated by an administrator as tagged by their SIEM, so it makes sense to reduce the workload by not incorrectly tagging these log messages. Reduced the log level to NOTICE which will still appear at the default log levels in case anyone is parsing these events in their SIEM. Signed-off-by: Brad House (@bradh352) --- sonic-xcvrd/xcvrd/xcvrd_utilities/port_event_helper.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sonic-xcvrd/xcvrd/xcvrd_utilities/port_event_helper.py b/sonic-xcvrd/xcvrd/xcvrd_utilities/port_event_helper.py index a085bf96c..165fdde8c 100644 --- a/sonic-xcvrd/xcvrd/xcvrd_utilities/port_event_helper.py +++ b/sonic-xcvrd/xcvrd/xcvrd_utilities/port_event_helper.py @@ -102,7 +102,7 @@ def subscribe_port_update_event(self): port_tbl.filter = d['FILTER'] if 'FILTER' in d else None asic_context[port_tbl] = asic_id sel.addSelectable(port_tbl) - self.logger.log_warning("subscribing to port_tbl {} - {} DB of namespace {} ".format( + self.logger.log_notice("subscribing to port_tbl {} - {} DB of namespace {} ".format( port_tbl, list(d.values())[0], namespace)) self.sel, self.asic_context = sel, asic_context @@ -144,7 +144,7 @@ def handle_port_update_event(self): if not multi_asic.is_front_panel_port(port_name, role): continue - self.logger.log_warning("$$$ {} handle_port_update_event() : op={} DB:{} Table:{} fvp {}".format( + self.logger.log_notice("$$$ {} handle_port_update_event() : op={} DB:{} Table:{} fvp {}".format( port_name, op, port_tbl.db_name, port_tbl.table_name, fvp)) if 'index' not in fvp: fvp['index'] = '-1' @@ -193,7 +193,7 @@ def handle_port_update_event(self): db_name, table_name) # This is the final event considered for processing - self.logger.log_warning("*** {} handle_port_update_event() fvp {}".format( + self.logger.log_notice("*** {} handle_port_update_event() fvp {}".format( key, fvp)) if port_change_event is not None: has_event = True