<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def set_log_level(self, level):
 """Set the logging level. Parameters level : logging level constant The value to set the logging level to. """

        self._log_level = level
        if self._python_logger:
            try:
                level = self.PYTHON_LEVEL.get(level)
            except ValueError as err:
                raise FailReply("Unknown logging level '%s'" % (level))
            self._python_logger.setLevel(level)