So, I'm making a java app using the Google Cloud Vision API and the method is returning many DEBUG logs to my console. I would like to disable them, but I don't know how. I'm getting this output https://pastebin.com/gVVJprhV
This is my code
public String googleapi(String image) throws IOException, Exception {
List<AnnotateImageRequest> requests = new ArrayList<>();
ByteString imgBytes = ByteString.readFrom(new FileInputStream(image));
Image img = Image.newBuilder().setContent(imgBytes).build();
Feature feat = Feature.newBuilder().setType(Type.TEXT_DETECTION).build();
AnnotateImageRequest request =
AnnotateImageRequest.newBuilder().addFeatures(feat).setImage(img).build();
requests.add(request);
String question = null;
try (ImageAnnotatorClient client = ImageAnnotatorClient.create()) {
BatchAnnotateImagesResponse response = client.batchAnnotateImages(requests);
List<AnnotateImageResponse> responses = response.getResponsesList();
for (AnnotateImageResponse res : responses) {
if (res.hasError()) {
//System.out.printf("Error: %s\n", res.getError().getMessage());
System.out.println("Se ta bom, n mexas");
return null;
}
EntityAnnotation annotation = res.getTextAnnotations(0);
question = annotation.getDescription();
question = question.replaceAll("\n", " ");
}
}
return question;
}
I don't know why it's throwing out all this debug, but I would like to disable it. Thanks in advance.