Change logging level info
@@ -55,12 +55,12 @@ public class StitchingApiServiceImpl implements StitchingApiService {
@Override
public ResponseEntity<String> getCallablesMetadata(List<String> fullFastenUris, boolean allAttributes, List<String> attributes) {
var total = System.currentTimeMillis();
- logger.debug("Received a list of callables");
+ logger.info("Received a list of callables");
if (!allAttributes && attributes == null) {
return new ResponseEntity<>("Either 'allAttributes' must be 'true' or a list of 'attributes' must be provided", HttpStatus.BAD_REQUEST);
}
Map<String, List<String>> packageVersionUris;
- logger.debug("Parsing full FASTEN URIs and grouping callables by package version");
+ logger.info("Parsing full FASTEN URIs and grouping callables by package version");
var start = System.currentTimeMillis();
try {
packageVersionUris = fullFastenUris.stream().map(FastenUriUtils::parseFullFastenUri).collect(Collectors.toMap(
@@ -75,9 +75,9 @@ public class StitchingApiServiceImpl implements StitchingApiService {
} catch (IllegalArgumentException e) {
return new ResponseEntity<>(e.getMessage(), HttpStatus.BAD_REQUEST);
}
- logger.debug("Parsing and grouping is done: {}ms", System.currentTimeMillis() - start);
+ logger.info("Parsing and grouping is done: {}ms", System.currentTimeMillis() - start);
var metadataMap = new HashMap<String, JSONObject>(fullFastenUris.size());
- logger.debug("Starting retrieving data from the database");
+ logger.info("Starting retrieving data from the database");
var time = System.currentTimeMillis();
for (var artifact : packageVersionUris.keySet()) {
var forge = artifact.split("!")[0];
@@ -85,16 +85,16 @@ public class StitchingApiServiceImpl implements StitchingApiService {
var packageName = forgelessArtifact.split("\\$")[0];
var version = forgelessArtifact.split("\\$")[1];
var partialUris = packageVersionUris.get(artifact);
- logger.debug("Sending database request to retrieve metadata for {} callables of {}:{}", partialUris.size(), packageName, version);
+ logger.info("Sending database request to retrieve metadata for {} callables of {}:{}", partialUris.size(), packageName, version);
start = System.currentTimeMillis();
var urisMetadata = KnowledgeBaseConnector.kbDao.getCallablesMetadataByUri(forge, packageName, version, partialUris);
- logger.debug("Database query is complete: {}ms", System.currentTimeMillis() - start);
+ logger.info("Database query is complete: {}ms", System.currentTimeMillis() - start);
if (urisMetadata != null) {
metadataMap.putAll(urisMetadata);
}
}
- logger.debug("All data is retrieved. In total data retrieval took {}ms", System.currentTimeMillis() - time);
- logger.debug("Now removing attributes which are not needed and putting everything into JSON");
+ logger.info("All data is retrieved. In total data retrieval took {}ms", System.currentTimeMillis() - time);
+ logger.info("Now removing attributes which are not needed and putting everything into JSON");
start = System.currentTimeMillis();
var json = new JSONObject();
for (var entry : metadataMap.entrySet()) {
@@ -112,8 +112,8 @@ public class StitchingApiServiceImpl implements StitchingApiService {
}
var result = json.toString();
result = result.replace("\\/", "/");
- logger.debug("Done: {}ms. Sending response", System.currentTimeMillis() - start);
- logger.debug("In total everything took {}ms", System.currentTimeMillis() - total);
+ logger.info("Done: {}ms. Sending response", System.currentTimeMillis() - start);
+ logger.info("In total everything took {}ms", System.currentTimeMillis() - total);
return new ResponseEntity<>(result, HttpStatus.OK);
}
