mirror of
				https://github.com/yuezk/GlobalProtect-openconnect.git
				synced 2025-05-20 07:26:58 -04:00 
			
		
		
		
	refactor: improve the log
This commit is contained in:
		| @@ -80,6 +80,12 @@ export const loginPortalAtom = atom( | ||||
|       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 | ||||
|     const previousSelectedGateway = get(selectedGatewayAtom)?.name; | ||||
|     const selectedGateway = gateways.find( | ||||
| @@ -106,7 +112,11 @@ export const loginPortalAtom = atom( | ||||
|       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 | ||||
|     await set(loginGatewayAtom, address, { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user