<SYSTEM_TASK:>
Solve the following problem using Python, implementing the functions described below, one line at a time
<END_TASK>
<USER_TASK:>
Description:
 def printif(self, obj_print, tipo_print=None):
 """Color output & logging."""

        if self.verbose:
            print(obj_print)
        if tipo_print == 'ok':
            logging.info(obj_print)
        elif tipo_print == 'error':
            logging.error(obj_print)
        elif tipo_print == 'warning':
            logging.warning(obj_print)