MarketSquare / SSHLibrary

Robot Framework test library for SSH and SFTP
http://marketsquare.github.io/SSHLibrary/
Other
158 stars 139 forks source link

logger.log_background_messages() not found in source function #450

Open OKHand-Zy opened 2 months ago

OKHand-Zy commented 2 months ago

I am trying to create a package for myself, but when I reviewed the function logger.log_background_messages(), I checked the source code in src/robot/api/logger.py, but I couldn't find the log_background_messages() function. I would like to ask if this function is working or not. https://github.com/MarketSquare/SSHLibrary/blob/dd072649d3374b3919be448b8730210a204fa99d/src/SSHLibrary/client.py#L170-L182

Noordsestern commented 2 months ago

Hi,

thanks. Good question... I think, this was supposed to work before Python2 support has been dropped a few days ago on master. I think the logger import in client.py is wrong and should be

from .logger import logger

That uses the library specific logger, which optionally is Backgroundlogger: https://github.com/MarketSquare/SSHLibrary/blob/0d7def124f515b227f8e136645b7d1f48e9174ff/src/SSHLibrary/logger.py#L16-L20

I am not sure though if Backgroundlogger is still required. I just started debugging the project.