How to Solve NameError: name 'logger' is not defined -- robot

Solution: Import the 'logger' module

To Solve the error, add the following line to the top of your code.

from robot.api import logger

 

For more information:
Python robot logger