Skip to content

Commit

Permalink
Replace println with log statements
Browse files Browse the repository at this point in the history
  • Loading branch information
matsbov committed Dec 15, 2023
1 parent 5f6154e commit c9184bf
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions grails-app/services/au/org/ala/bie/WebClientService.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -45,15 +45,15 @@ class WebClientService implements InitializingBean {
throw e
else{
def error = [error: "Timed out calling web service. URL= ${url}."]
println error.error
log.error error.error
return new groovy.json.JsonBuilder( error ).toString()
}
} catch (Exception e) {
if(throwError)
throw e;
else{
def error = [error: "Failed calling web service. ${e.getClass()} ${e.getMessage()} URL= ${url}."]
println error.error
log.info error.error
return new groovy.json.JsonBuilder( error ).toString()
}
}
Expand Down Expand Up @@ -158,11 +158,11 @@ class WebClientService implements InitializingBean {
return [error: null, resp: JSON.parse(resp)]
} catch (SocketTimeoutException e) {
def error = [error: "Timed out calling web service POST. URL= ${url}."]
println error.error
log.error error.error
return error
} catch (Exception e) {
def error = [error: "Failed calling web service POST. ${e.getClass()} ${e.getMessage()} ${e} URL= ${url}."]
println error.error
log.info error.error
return error
}
}
Expand Down

0 comments on commit c9184bf

Please sign in to comment.