'Return aggregated log data for this application.'

def logs(self, log_lines=str(settings.LOG_LINES)):

    try:
        url = u'http://{}:{}/{}?log_lines={}'.format(settings.LOGGER_HOST, settings.LOGGER_PORT, self.id, log_lines)
        r = requests.get(url)
    except requests.exceptions.RequestException as e:
        logger.error(u"Error    accessing    deis-logger    using    url    '{}':    {}".format(url, e))
        raise e
    if ((r.status_code == 204) or (r.status_code == 404)):
        logger.info(u'GET    {}    returned    a    {}    status    code'.format(url, r.status_code))
        raise EnvironmentError(u'Could    not    locate    logs')
    if (r.status_code != 200):
        logger.error(u'Error    accessing    deis-logger:    GET    {}    returned    a    {}    status    code'.format(url, r.status_code))
        raise EnvironmentError(u'Error    accessing    deis-logger')
    return r.content
