DATAGRAPH-224 changed info logging to debu
This commit is contained in:
@@ -69,7 +69,8 @@ public class CrossStoreNodeEntityState<ENTITY extends NodeBacked> extends Defaul
|
||||
node = persistentEntity.isUnique() ? template.createUniqueNode(entity) : template.createNode();
|
||||
persistForeignId(node, id);
|
||||
setPersistentState(node);
|
||||
log.info("User-defined constructor called on class " + entity.getClass() + "; created Node [" + entity.getPersistentState() + "]; Updating metamodel");
|
||||
if (log.isDebugEnabled())
|
||||
log.debug("User-defined constructor called on class " + entity.getClass() + "; created Node [" + entity.getPersistentState() + "]; Updating metamodel");
|
||||
template.postEntityCreation(node, type);
|
||||
} else {
|
||||
setPersistentState(node);
|
||||
|
||||
@@ -67,11 +67,11 @@ public abstract class DelegatingFieldAccessorFactory implements FieldAccessorFac
|
||||
if (property.isSyntheticField()) return null;
|
||||
for (final FieldAccessorFactory fieldAccessorFactory : fieldAccessorFactories) {
|
||||
if (fieldAccessorFactory.accept(property)) {
|
||||
if (log.isInfoEnabled()) log.info("Factory " + fieldAccessorFactory + " used for field: " + property);
|
||||
if (log.isDebugEnabled()) log.debug("Factory " + fieldAccessorFactory + " used for field: " + property);
|
||||
return fieldAccessorFactory;
|
||||
}
|
||||
}
|
||||
if (log.isWarnEnabled()) log.warn("No FieldAccessor configured for field: " + property);
|
||||
if (log.isInfoEnabled()) log.info("No FieldAccessor configured for field: " + property);
|
||||
return null;
|
||||
}
|
||||
|
||||
|
||||
@@ -100,7 +100,7 @@ public abstract class AbstractConstructorEntityInstantiator<STATE> implements En
|
||||
if (constructor == null)
|
||||
return null;
|
||||
|
||||
log.info("Using " + type + " no-arg constructor");
|
||||
if (log.isDebugEnabled()) log.debug("Using " + type + " no-arg constructor");
|
||||
|
||||
return new StateBackedCreator<T, STATE>() {
|
||||
public T create(STATE state, Class<T> c) throws Exception {
|
||||
|
||||
@@ -42,7 +42,7 @@ public class NodeEntityState extends DefaultEntityState<Node> {
|
||||
@Override
|
||||
public void createAndAssignState() {
|
||||
if (hasPersistentState()) {
|
||||
if (log.isInfoEnabled()) log.info("Entity "+entity.getClass()+" already has persistent state "+getPersistentState());
|
||||
if (log.isDebugEnabled()) log.debug("Entity "+entity.getClass()+" already has persistent state "+getPersistentState());
|
||||
return;
|
||||
}
|
||||
try {
|
||||
@@ -50,14 +50,14 @@ public class NodeEntityState extends DefaultEntityState<Node> {
|
||||
if (id instanceof Number) {
|
||||
final Node node = template.getNode(((Number) id).longValue());
|
||||
setPersistentState(node);
|
||||
if (log.isInfoEnabled())
|
||||
log.info("Entity reattached " + entity.getClass() + "; used Node [" + getPersistentState() + "];");
|
||||
if (log.isDebugEnabled())
|
||||
log.debug("Entity reattached " + entity.getClass() + "; used Node [" + getPersistentState() + "];");
|
||||
return;
|
||||
}
|
||||
|
||||
final Node node = persistentEntity.isUnique() ? template.createUniqueNode(entity) : template.createNode();
|
||||
setPersistentState(node);
|
||||
if (log.isInfoEnabled()) log.info("User-defined constructor called on class " + entity.getClass() + "; created Node [" + getPersistentState() + "]; Updating metamodel");
|
||||
if (log.isDebugEnabled()) log.debug("User-defined constructor called on class " + entity.getClass() + "; created Node [" + getPersistentState() + "]; Updating metamodel");
|
||||
template.postEntityCreation(node, type);
|
||||
} catch (NotInTransactionException e) {
|
||||
throw new InvalidDataAccessResourceUsageException("Not in a Neo4j transaction.", e);
|
||||
|
||||
@@ -56,13 +56,13 @@ public class RelationshipEntityState extends DefaultEntityState<Relationship> {
|
||||
if (id instanceof Number) {
|
||||
final Relationship relationship = template.getRelationship(((Number) id).longValue());
|
||||
setPersistentState(relationship);
|
||||
if (log.isInfoEnabled())
|
||||
log.info("Entity reattached " + entity.getClass() + "; used Relationship [" + state + "];");
|
||||
if (log.isDebugEnabled())
|
||||
log.debug("Entity reattached " + entity.getClass() + "; used Relationship [" + state + "];");
|
||||
return;
|
||||
}
|
||||
final Relationship relationship = createRelationshipFromEntity();
|
||||
setPersistentState(relationship);
|
||||
if (log.isInfoEnabled()) log.info("User-defined constructor called on class " + entity.getClass() + "; created Relationship [" + getPersistentState() + "]; Updating metamodel");
|
||||
if (log.isDebugEnabled()) log.debug("User-defined constructor called on class " + entity.getClass() + "; created Relationship [" + getPersistentState() + "]; Updating metamodel");
|
||||
template.postEntityCreation(relationship, type);
|
||||
} catch (NotInTransactionException e) {
|
||||
throw new InvalidDataAccessResourceUsageException("Not in a Neo4j transaction.", e);
|
||||
|
||||
Reference in New Issue
Block a user