def METHOD_NAME(self, msg, ok):
    """Helper to log message to the right level."""
    if self._config['color']:
        CGREEN, CRED, CEND = '\033[92m', '\033[91m', '\033[0m'
    else:
        CGREEN = CRED = CEND = ''
    LOG_LEVELS = {False: logging.ERROR, True: logging.INFO}
    # pylint: disable=logging-not-lazy
    L.log(LOG_LEVELS[ok],
          '%35s %s' + CEND, msg, CGREEN + 'PASS' if ok else CRED + 'FAIL')