How to retrieve Build Forge log information by step using Java API?
Hello,
I've been trying to retrieve BF log programmatically using Java API and I have difficult to filter the log information I want. I want to recover the log from a step, but I can't find a way to ignore log from previous step. This is my code:
Project project = Project.findByName(clientConnection, projectName);
List<Build> list = Build.findByProjectUuid(clientConnection, project.getUuid());
Build build;
List<Result> results;
List<Log> logs;
String aux = "";
for (int i = 0; i < list.size(); i++) {
build = list.get(i);
if(build.getTag().contains(tagValue) ){
results = build.getResults();
for (Result result : results) {
logs = result.getLogs();
for (Log log : logs) {
aux = aux + log.getLineId() + " " + log.getType() + " " + log.getMessageText() + "\n";
}
}
}
}
I tried to use QueryFilter, but I was not able to filter just the information that I need. Does anybody have a solution or a tip?
Thanks in advance,
Bruno
|
Be the first one to answer this question!
Dashboards and work items are no longer publicly available, so some links may be invalid. We now provide similar information through other means. Learn more here.