Skip to content

Commit

Permalink
Merge pull request #336 from ncats/addLogsForTesting
Browse files Browse the repository at this point in the history
change log level to test
  • Loading branch information
ChemMitch authored May 22, 2024
2 parents 172ad0b + 4e1066c commit aed7ba9
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,32 +32,32 @@ public void setEntityString(String entities) {
@Override
public void run(SchedulerPlugin.JobStats stats, SchedulerPlugin.TaskListener l) {
if(entityString.length()==0) {
log.info("No entities defined for the database and index sync scheduler.");
log.error("DatabaseIndexSyncTask: No entities defined for the database and index sync scheduler.");
return;
}

Set<String> syncEntities = Stream.of(entityString.split(",")).map(entity->entity.trim()).collect(Collectors.toSet());
syncEntities.retainAll(supportedEntities);
if(syncEntities.size()==0) {
log.info("No allowed entities defined for the database and index sync scheduler.");
log.error("DatabaseIndexSyncTask: No allowed entities defined for the database and index sync scheduler.");
return;
}

for(String entity: syncEntities) {

String entityClassName = generateEntityClassName(entity);
log.info("Entity class: " + entityClassName);
log.error("DatabaseIndexSyncTask: Entity class: " + entityClassName);

if(entityClassName.isEmpty()) {
log.warn("Illegal entity class: " + entity + " in database and index sync scheduler.");
log.error("Illegal entity class: " + entity + " in database and index sync scheduler.");
continue;
}

Class<?> entityClass;
try {
entityClass = Class.forName(entityClassName);
} catch (ClassNotFoundException e) {
log.warn("Entity class is not found: " + entityClassName);
log.error("Entity class is not found: " + entityClassName);
continue;
}

Expand Down

0 comments on commit aed7ba9

Please sign in to comment.