Add PBS Logging.

This commit is contained in:
Patrick Fic
2022-01-21 10:32:02 -08:00
parent 9aa85b3ab5
commit 61090aa04c
2 changed files with 43 additions and 3 deletions

View File

@@ -30,7 +30,7 @@ axios.interceptors.request.use((x) => {
} | ${JSON.stringify(x.data)} | ${JSON.stringify(headers)}`;
console.log(printable);
CdkBase.createLogEvent(socket, "TRACE", `Raw Request: ${printable}`);
CdkBase.createJsonEvent(socket, "TRACE", `Raw Request: ${printable}`, x.data);
return x;
});
@@ -42,7 +42,12 @@ axios.interceptors.response.use((x) => {
x.data
)}`;
console.log(printable);
CdkBase.createLogEvent(socket, "TRACE", `Raw Response: ${printable}`);
CdkBase.createJsonEvent(
socket,
"TRACE",
`Raw Response: ${printable}`,
x.data
);
return x;
});