diff --git a/qqq-backend-module-api/src/main/java/com/kingsrook/qqq/backend/module/api/actions/BaseAPIActionUtil.java b/qqq-backend-module-api/src/main/java/com/kingsrook/qqq/backend/module/api/actions/BaseAPIActionUtil.java index 98393b89..5be4635d 100644 --- a/qqq-backend-module-api/src/main/java/com/kingsrook/qqq/backend/module/api/actions/BaseAPIActionUtil.java +++ b/qqq-backend-module-api/src/main/java/com/kingsrook/qqq/backend/module/api/actions/BaseAPIActionUtil.java @@ -96,6 +96,7 @@ import org.apache.http.impl.client.HttpClientBuilder; import org.apache.http.impl.client.HttpClients; import org.apache.http.impl.conn.PoolingHttpClientConnectionManager; import org.apache.http.util.EntityUtils; +import org.apache.logging.log4j.Level; import org.json.JSONArray; import org.json.JSONObject; import static com.kingsrook.qqq.backend.core.logging.LogUtils.logPair; @@ -1081,7 +1082,7 @@ public class BaseAPIActionUtil ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// // trim response body (just to keep logs smaller, or, in case someone consuming logs doesn't want such long lines) // ///////////////////////////////////////////////////////////////////////////////////////////////////////////////////// - LOG.debug("Received successful response with code [" + qResponse.getStatusCode() + "] and content [" + StringUtils.safeTruncate(qResponse.getContent(), getMaxResponseMessageLengthForLog(), "...") + "]."); + LOG.log(getAPIResponseLogLevel(), "Received successful response with code [" + qResponse.getStatusCode() + "] and content [" + StringUtils.safeTruncate(qResponse.getContent(), getMaxResponseMessageLengthForLog(), "...") + "]."); return (qResponse); } } @@ -1507,4 +1508,14 @@ public class BaseAPIActionUtil // nothing to do at this layer, meant to be overridden by subclasses // /////////////////////////////////////////////////////////////////////// } + + + + /******************************************************************************* + ** + *******************************************************************************/ + protected Level getAPIResponseLogLevel() throws QException + { + return (Level.DEBUG); + } }