Commit 0394ff2d authored by harshit aggarwal's avatar harshit aggarwal
Browse files

minor log addition

parent b3984892
......@@ -15,6 +15,7 @@ public class Constants {
public static final String NO_MAPPING_FOR_KIND = "Mapping not found for {}";
public static final String NO_MAPPING_FOR_ANY_RECORD = "Mapping not found for any record";
public static final String ERROR_WHILE_GETTING_RAW_RECORD = "Error retrieving raw record.";
public static final String TRANSFORMATION_STARTED = "Transformation started for raw record with id: {} with {} mapping files";
public static final String TRANFORMATION_SUCCESSFUL = "Transformed successfully raw record id: {}, wks record id: {} and wks schema kind: {}";
public static final String TRANFORMATION_ALREADY_DONE = "Transformation already done for {} out of {} records";
public static final String RAW_RECORD_NOT_PRESENT = "Raw record not present";
......
......@@ -125,8 +125,9 @@ public class WKSServiceImpl implements WKSService {
List<RelationshipStatus> relationshipStatusList = new ArrayList<>();
for (RawRecordDetails rawRecord : rawRecordsDetails) {
try {
List<MappingsModel> mappingsList = retrieveMappings(mappingsMap, rawRecord);
List<MappingsModel> mappingsList = retrieveMappings(mappingsMap, rawRecord);
LOGGER.info(Constants.TRANSFORMATION_STARTED, rawRecord.getId(), mappingsList.size());
Tree rawRecordTree = retrieveRawRecordTree(rawRecord);
for (MappingsModel mappings: mappingsList) {
......@@ -152,9 +153,9 @@ public class WKSServiceImpl implements WKSService {
catch (Exception e) {
LOGGER.warn(Constants.TRANSFORMATION_FAILED_FOR_GIVEN_WKS_KIND, rawRecord.getId(), mappings.getTargetSchemaKind(), e.getMessage(), e);
}
}
} catch (ApplicationException e) {
LOGGER.warn(Constants.TRANFORMATION_FAILED, rawRecord.getId(), e.getErrorMsg(), e);
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment