Fixing logs
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/information-system/resource-registry-client@146916 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
cccb7dc18f
commit
442896a509
|
@ -73,8 +73,10 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
||||||
|
|
||||||
logger.debug("{} with UUID {} exists", type, uuid);
|
logger.debug("{} with UUID {} exists", type, uuid);
|
||||||
} catch (ResourceRegistryException e) {
|
} catch (ResourceRegistryException e) {
|
||||||
|
//logger.trace("Error while checking if {} with UUID {} exists.", type, uuid, e);
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
|
//logger.trace("Error while checking if {} with UUID {} exists.", type, uuid, e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -101,10 +103,10 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
||||||
logger.debug("Got {} with UUID {} is {}", type, uuid, erType);
|
logger.debug("Got {} with UUID {} is {}", type, uuid, erType);
|
||||||
return erType;
|
return erType;
|
||||||
} catch (ResourceRegistryException e) {
|
} catch (ResourceRegistryException e) {
|
||||||
logger.error("Error while getting {} with UUID {}", type, uuid, e);
|
//logger.trace("Error while getting {} with UUID {}", type, uuid, e);
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error while getting {} with UUID {}", type, uuid, e);
|
//logger.trace("Error while getting {} with UUID {}", type, uuid, e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -128,14 +130,12 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
||||||
String ret = httpCall.call(String.class, stringWriter.toString(), HTTPMETHOD.GET, parameters);
|
String ret = httpCall.call(String.class, stringWriter.toString(), HTTPMETHOD.GET, parameters);
|
||||||
|
|
||||||
logger.debug("Got instances of {} are {}", type, ret);
|
logger.debug("Got instances of {} are {}", type, ret);
|
||||||
|
|
||||||
return ISMapper.unmarshalList(Entity.class, ret);
|
return ISMapper.unmarshalList(Entity.class, ret);
|
||||||
|
|
||||||
} catch (ResourceRegistryException e) {
|
} catch (ResourceRegistryException e) {
|
||||||
logger.error("Error while getting {} instances", type, e);
|
//logger.trace("Error while getting {} instances", type, e);
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error while getting {} instances", type, e);
|
//logger.trace("Error while getting {} instances", type, e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -162,14 +162,12 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
||||||
String ret = httpCall.call(String.class, stringWriter.toString(), HTTPMETHOD.GET, parameters);
|
String ret = httpCall.call(String.class, stringWriter.toString(), HTTPMETHOD.GET, parameters);
|
||||||
|
|
||||||
logger.debug("Got instances of {} from/to {} are {}", relationType, reference.toString(), ret);
|
logger.debug("Got instances of {} from/to {} are {}", relationType, reference.toString(), ret);
|
||||||
|
|
||||||
return ISMapper.unmarshalList(Resource.class, ret);
|
return ISMapper.unmarshalList(Resource.class, ret);
|
||||||
|
|
||||||
} catch (ResourceRegistryException e) {
|
} catch (ResourceRegistryException e) {
|
||||||
logger.error("Error while getting instances of {} from/to {}", relationType, e);
|
//logger.trace("Error while getting instances of {} from/to {}", relationType, e);
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error while getting instances of {} from/to {}", relationType, e);
|
//logger.trace("Error while getting instances of {} from/to {}", relationType, e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -196,16 +194,14 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
||||||
String schema = httpCall.call(String.class, stringWriter.toString(), HTTPMETHOD.GET, parameters);
|
String schema = httpCall.call(String.class, stringWriter.toString(), HTTPMETHOD.GET, parameters);
|
||||||
|
|
||||||
logger.debug("Got schema for {} is {}", type, schema);
|
logger.debug("Got schema for {} is {}", type, schema);
|
||||||
|
|
||||||
return TypeBinder.deserializeTypeDefinitions(schema);
|
return TypeBinder.deserializeTypeDefinitions(schema);
|
||||||
|
|
||||||
} catch (ResourceRegistryException e) {
|
} catch (ResourceRegistryException e) {
|
||||||
logger.error("Error while getting {}schema for {}", polymorphic ? AccessPath.POLYMORPHIC_PARAM + " " : "",
|
//logger.trace("Error while getting {}schema for {}", polymorphic ? AccessPath.POLYMORPHIC_PARAM + " " : "",
|
||||||
type, e);
|
// type, e);
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error while getting {}schema for {}", polymorphic ? AccessPath.POLYMORPHIC_PARAM + " " : "",
|
//logger.trace("Error while getting {}schema for {}", polymorphic ? AccessPath.POLYMORPHIC_PARAM + " " : "",
|
||||||
type, e);
|
// type, e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -215,7 +211,7 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
||||||
throws InvalidQueryException, ResourceRegistryException {
|
throws InvalidQueryException, ResourceRegistryException {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
logger.debug("Going to query. {}", query);
|
logger.info("Going to query. {}", query);
|
||||||
StringWriter stringWriter = new StringWriter();
|
StringWriter stringWriter = new StringWriter();
|
||||||
stringWriter.append(PATH_SEPARATOR);
|
stringWriter.append(PATH_SEPARATOR);
|
||||||
stringWriter.append(AccessPath.ACCESS_PATH_PART);
|
stringWriter.append(AccessPath.ACCESS_PATH_PART);
|
||||||
|
@ -235,14 +231,12 @@ public class ResourceRegistryClientImpl implements ResourceRegistryClient {
|
||||||
String ret = httpCall.call(String.class, stringWriter.toString(), HTTPMETHOD.GET, parameters);
|
String ret = httpCall.call(String.class, stringWriter.toString(), HTTPMETHOD.GET, parameters);
|
||||||
|
|
||||||
logger.debug("Query result is {}", ret);
|
logger.debug("Query result is {}", ret);
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
|
|
||||||
} catch (ResourceRegistryException e) {
|
} catch (ResourceRegistryException e) {
|
||||||
logger.error("Error while querying", e);
|
//logger.trace("Error while querying", e);
|
||||||
throw e;
|
throw e;
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
logger.error("Error while querying", e);
|
//logger.trace("Error while querying", e);
|
||||||
throw new RuntimeException(e);
|
throw new RuntimeException(e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue