Skip to content

Commit

Permalink
[xcvrd] silence port update event warnings (PR sonic-net#567)
Browse files Browse the repository at this point in the history
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)
  • Loading branch information
bradh352 committed Dec 24, 2024
1 parent 15dd6ba commit 48c67ec
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sonic-xcvrd/xcvrd/xcvrd_utilities/port_event_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down Expand Up @@ -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'
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit 48c67ec

Please sign in to comment.