'Get current log levels for services.'

def _get_log(self, context, body):

    prefix = body.get('prefix')
    (binaries, services) = self._log_params_binaries_services(context, body)
    result = []
    log_req = objects.LogLevel(context, prefix=prefix)
    if (constants.API_BINARY in binaries):
        levels = utils.get_log_levels(prefix)
        result.append({'host': CONF.host, 'binary': constants.API_BINARY, 'levels': levels})
    for service in services:
        levels = self.rpc_apis[service.binary].get_log_levels(context, service, log_req)
        result.append({'host': service.host, 'binary': service.binary, 'levels': {l.prefix: l.level for l in levels}})
    return {'log_levels': result}
