mirror of
https://github.com/Kingsrook/qqq.git
synced 2025-07-18 05:01:07 +00:00
added getAPIResponseLogLevel as base method that can be overridden in subsclasses
This commit is contained in:
@ -96,6 +96,7 @@ import org.apache.http.impl.client.HttpClientBuilder;
|
|||||||
import org.apache.http.impl.client.HttpClients;
|
import org.apache.http.impl.client.HttpClients;
|
||||||
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
|
import org.apache.http.impl.conn.PoolingHttpClientConnectionManager;
|
||||||
import org.apache.http.util.EntityUtils;
|
import org.apache.http.util.EntityUtils;
|
||||||
|
import org.apache.logging.log4j.Level;
|
||||||
import org.json.JSONArray;
|
import org.json.JSONArray;
|
||||||
import org.json.JSONObject;
|
import org.json.JSONObject;
|
||||||
import static com.kingsrook.qqq.backend.core.logging.LogUtils.logPair;
|
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) //
|
// 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);
|
return (qResponse);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1507,4 +1508,14 @@ public class BaseAPIActionUtil
|
|||||||
// nothing to do at this layer, meant to be overridden by subclasses //
|
// nothing to do at this layer, meant to be overridden by subclasses //
|
||||||
///////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
/*******************************************************************************
|
||||||
|
**
|
||||||
|
*******************************************************************************/
|
||||||
|
protected Level getAPIResponseLogLevel() throws QException
|
||||||
|
{
|
||||||
|
return (Level.DEBUG);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user