Skip to content

[Master] SffLoggerForPortUpdateEvent class does not have log_debug function #605

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
veronica-arista opened this issue Apr 4, 2025 · 2 comments · May be fixed by #604
Open

[Master] SffLoggerForPortUpdateEvent class does not have log_debug function #605

veronica-arista opened this issue Apr 4, 2025 · 2 comments · May be fixed by #604
Assignees
Labels

Comments

@veronica-arista
Copy link

A recent PR #582 changed a call in sonic-xcvrd/xcvrd/xcvrd_utilities/port_event_helper.py from log_warning() to log_debug(), which does not exist for SffLoggerForPortUpdateEvent, resulting in the following error:

ERR pmon#xcvrd[317]: Exception occured at SffManagerTask thread due to AttributeError("'SffLoggerForPortUpdateEvent' object has no attribute 'log_debug'")
ERR pmon#xcvrd[317]: Traceback (most recent call last):
ERR pmon#xcvrd[317]:   File "/usr/local/lib/python3.11/dist-packages/xcvrd/sff_mgr.py", line 231, in run
ERR pmon#xcvrd[317]:     self.task_worker()
ERR pmon#xcvrd[317]:   File "/usr/local/lib/python3.11/dist-packages/xcvrd/sff_mgr.py", line 323, in task_worker
ERR pmon#xcvrd[317]:     if not port_change_observer.handle_port_update_event():
ERR pmon#xcvrd[317]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ERR pmon#xcvrd[317]:   File "/usr/local/lib/python3.11/dist-packages/xcvrd/xcvrd_utilities/port_event_helper.py", line 147, in handle_port_update_event
ERR pmon#xcvrd[317]:     self.logger.log_debug("$$$ {} handle_port_update_event() : op={} DB:{} Table:{} fvp {}".format(
ERR pmon#xcvrd[317]:     ^^^^^^^^^^^^^^^^^^^^^
ERR pmon#xcvrd[317]: AttributeError: 'SffLoggerForPortUpdateEvent' object has no attribute 'log_debug'

We should add a log_debug level to SffLoggerForPortUpdateEvent to fix this.

@prgeor
Copy link
Collaborator

prgeor commented Apr 5, 2025

@mihirpat1 I guess you are fixing this in your recent PR

@rlhui rlhui changed the title SffLoggerForPortUpdateEvent class does not have log_debug function [Master] SffLoggerForPortUpdateEvent class does not have log_debug function Apr 16, 2025
@rlhui rlhui added the P0 label Apr 30, 2025
@rlhui
Copy link

rlhui commented Apr 30, 2025

@prgeor , @mihirpat1 can we have a smaller PR to address this issue? thanks,

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
Status: No status
4 participants