Added some logs for real event endpoint and JSON payload
This commit is contained in:
parent
9b888a796b
commit
53b46a72a1
|
@ -59,11 +59,11 @@ public class HTTPEventSender implements EventSender {
|
||||||
public void run() {
|
public void run() {
|
||||||
try {
|
try {
|
||||||
if (log.isDebugEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.debug("Getting token for client: " + clientId);
|
log.debug("Getting OIDC token for client: " + clientId);
|
||||||
}
|
}
|
||||||
JWTToken token = OpenIdConnectRESTHelper.queryClientToken(clientId, clientSecret, tokenURL);
|
JWTToken token = OpenIdConnectRESTHelper.queryClientToken(clientId, clientSecret, tokenURL);
|
||||||
if (log.isTraceEnabled()) {
|
if (log.isDebugEnabled()) {
|
||||||
log.trace("Performing HTTP POST");
|
log.debug("Performing HTTP POST to: " + endpoint);
|
||||||
}
|
}
|
||||||
HttpURLConnection connection = (HttpURLConnection) endpoint.openConnection();
|
HttpURLConnection connection = (HttpURLConnection) endpoint.openConnection();
|
||||||
connection.setConnectTimeout(CONNECTION_TIMEOUT);
|
connection.setConnectTimeout(CONNECTION_TIMEOUT);
|
||||||
|
@ -82,7 +82,7 @@ public class HTTPEventSender implements EventSender {
|
||||||
connection.setRequestProperty("Authorization", token.getAsBearer());
|
connection.setRequestProperty("Authorization", token.getAsBearer());
|
||||||
OutputStream os = connection.getOutputStream();
|
OutputStream os = connection.getOutputStream();
|
||||||
if (log.isTraceEnabled()) {
|
if (log.isTraceEnabled()) {
|
||||||
log.trace("Sending event JSON");
|
log.trace("Sending event JSON: " + jsonString);
|
||||||
}
|
}
|
||||||
os.write(jsonString.getBytes("UTF-8"));
|
os.write(jsonString.getBytes("UTF-8"));
|
||||||
os.close();
|
os.close();
|
||||||
|
|
Loading…
Reference in New Issue