mirror of
https://github.com/yuezk/GlobalProtect-openconnect.git
synced 2025-04-02 18:31:50 -04:00
refactor: improve the log
This commit is contained in:
parent
356946e635
commit
69502b22a9
@ -80,6 +80,12 @@ export const loginPortalAtom = atom(
|
|||||||
throw new AbnormalPortalConfigError("Empty user auth cookie");
|
throw new AbnormalPortalConfigError("Empty user auth cookie");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
logger.info(
|
||||||
|
`Retrieved ${gateways.length} gateways, userAuthCookie: ${redact(
|
||||||
|
userAuthCookie
|
||||||
|
)}, prelogonUserAuthCookie: ${redact(prelogonUserAuthCookie)}`
|
||||||
|
);
|
||||||
|
|
||||||
// Here, we have got the portal config successfully, refresh the cached portal data
|
// Here, we have got the portal config successfully, refresh the cached portal data
|
||||||
const previousSelectedGateway = get(selectedGatewayAtom)?.name;
|
const previousSelectedGateway = get(selectedGatewayAtom)?.name;
|
||||||
const selectedGateway = gateways.find(
|
const selectedGateway = gateways.find(
|
||||||
@ -106,7 +112,11 @@ export const loginPortalAtom = atom(
|
|||||||
preferredGateway: previousSelectedGateway,
|
preferredGateway: previousSelectedGateway,
|
||||||
});
|
});
|
||||||
|
|
||||||
logger.info(`Found the preferred gateway: ${name} (${redact(address)})`);
|
logger.info(
|
||||||
|
`Found the preferred gateway: ${name} (${redact(
|
||||||
|
address
|
||||||
|
)}) for region: ${region}`
|
||||||
|
);
|
||||||
|
|
||||||
// Log in to the gateway
|
// Log in to the gateway
|
||||||
await set(loginGatewayAtom, address, {
|
await set(loginGatewayAtom, address, {
|
||||||
|
Loading…
Reference in New Issue
Block a user