def METHOD_NAME(self, testing=None, name=None, action=None):
    name = name if name else __name__
    if not testing and action:
        log_name = f"{name}_{action.unique_id.split('-')[0]}"
    else:
        log_name = name
    self.logger = logging.getLogger(log_name)
    if not testing and action:
        with session_scope(MYCODO_DB_PATH) as new_session:
            debug_level = logging.INFO
            input_dev = new_session.query(Input).filter(
                Input.unique_id == action.function_id).first()
            conditional = new_session.query(Conditional).filter(
                Conditional.unique_id == action.function_id).first()
            function = new_session.query(Function).filter(
                Function.unique_id == action.function_id).first()
            trigger = new_session.query(Trigger).filter(
                Trigger.unique_id == action.function_id).first()
            if input_dev and input_dev.log_level_debug:
                debug_level = logging.DEBUG
            elif conditional and conditional.log_level_debug:
                debug_level = logging.DEBUG
            elif function and function.log_level_debug:
                debug_level = logging.DEBUG
            elif trigger and trigger.log_level_debug:
                debug_level = logging.DEBUG
            self.logger.setLevel(debug_level)