Robot Framework: set logging level for a certain library

Viewed 960

I'm importing custom library in my test based on some other python modules which are using python logging. In certain situations python logging inside python packages emits ERROR message which I would like to disable. The problem is I've tried different ways but all of them are not working:

  1. Set log level inside custom library for imported python module
    imported_logger = logging.getLogger('<name of imported python module>')
    imported_logger.setLevel(logging.INFO)
    
  2. Set log level inside custom library for both current file and imported python module

    imported_logger = logging.getLogger('<name of imported python module>')
    imported_logger.setLevel(logging.INFO)
    current_logger = logging.getLogger(__name__)
    current_logger.setLevel(logging.INFO)
    
  3. Set log level for robot framework

robot --loglevel INFO test.robot

All together these actions are not working. I still receiving ERROR messages from logging. Could you please help me to solve this issue?

0 Answers
Related