def log(exception)
      msg = error_msg(exception)
      case exception
        when *NON_TEMP_ERRORS
          logger.error(msg)
        when *TEMP_ERRORS
          logger.warn(msg)
        else
          logger.error(msg)
      end
    end
def log(exception)
      msg = error_msg(exception)
      case exception
        when *NON_TEMP_ERRORS
          logger.error(msg)
        when *TEMP_ERRORS
          logger.warn(msg)
        else
          logger.error(msg)
      end
    end
For exceptions that are likely to require the user intervention, we log
 errors. For example, when the report could not be made because the 3scale
 client received an invalid provider key.
 On the other hand, for errors that are likely to be temporary, like when
 we could not connect with 3scale, we log a warning.