added logs
This commit is contained in:
parent
eb9cbdcfde
commit
02c7bf1c3c
@ -114,7 +114,13 @@ public class ExportToWso2 extends AbstractProcess {
|
|||||||
byte[] data = prepareApiZipFile(ver, ref);
|
byte[] data = prepareApiZipFile(ver, ref);
|
||||||
String fileName = api.getName() + "-" + ver.getVersion() + ".zip";
|
String fileName = api.getName() + "-" + ver.getVersion() + ".zip";
|
||||||
if (data != null && data.length > 0 && fileName != null && !fileName.isEmpty()) {
|
if (data != null && data.length > 0 && fileName != null && !fileName.isEmpty()) {
|
||||||
publishApiToWso2(fileName, data, tokenResponse);
|
int responseCode = publishApiToWso2(fileName, data, tokenResponse);
|
||||||
|
if (responseCode == 200 || responseCode == 201) {
|
||||||
|
log.info(" - API version {} imported successfully", ver.getVersion());
|
||||||
|
} else {
|
||||||
|
log.warn(" - API version {} import failed with response code {}", ver.getVersion(),
|
||||||
|
responseCode);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user