Skip to content

Commit c34d566

Browse files
VIA-347 SB & AS Reset some logging back to debug.
1 parent 2914c3a commit c34d566

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/utils/auth/apim/fetch-apim-access-token.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,19 +11,19 @@ const log: Logger = logger.child({ module: "utils-auth-apim-fetch-apim-access-to
1111

1212
const fetchAPIMAccessToken = async (idToken: IdToken): Promise<ApimTokenResponse> => {
1313
const apimConfig: ApimConfig = await apimConfigProvider();
14-
log.info({ context: { apimConfig, idToken } }, "Fetching APIM Access Token");
14+
log.debug({ context: { apimConfig, idToken } }, "Fetching APIM Access Token");
1515

1616
try {
1717
const tokenPayload: APIMTokenPayload = generateAPIMTokenPayload(apimConfig, idToken);
18-
log.info({ context: { tokenPayload } }, "APIM token payload");
18+
log.debug({ context: { tokenPayload } }, "APIM token payload");
1919

2020
const response: AxiosResponse<ApimTokenResponse> = await axios.post(apimConfig.APIM_AUTH_URL.href, tokenPayload, {
2121
headers: { "Content-Type": "application/x-www-form-urlencoded" },
2222
timeout: 5000,
2323
validateStatus: (status) => status < HttpStatusCode.BadRequest,
2424
});
2525

26-
log.info("APIM access token fetched");
26+
log.info({ context: { apimToken: response.data } }, "APIM access token fetched");
2727
return response.data;
2828
} catch (error) {
2929
if (axios.isAxiosError(error)) {

src/utils/logger.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ const REDACT_KEYS: string[] = [
1414
"access_token",
1515
"apiKey",
1616
"api_key",
17+
"apimToken",
1718
"aud",
1819
"birthdate",
1920
"clientAssertion",

0 commit comments

Comments
 (0)