Skip to content

Commit 5793151

Browse files
committed
update logs
1 parent 55ed148 commit 5793151

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

veadk/auth/veauth/ark_veauth.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ def get_ark_token(region: str = "cn-beijing") -> str:
4848
)
4949
try:
5050
first_api_key_id = res["Result"]["Items"][0]["Id"]
51+
logger.warning("By default, VeADK fetches the first API Key in the list.")
52+
logger.info(
53+
f"Try to fetch ARK API Key with id={first_api_key_id}, name={res['Result']['Items'][0]['Name']}"
54+
)
5155
except KeyError:
5256
raise ValueError(f"Failed to get ARK api key list: {res}")
5357

@@ -65,7 +69,7 @@ def get_ark_token(region: str = "cn-beijing") -> str:
6569
)
6670
try:
6771
api_key = res["Result"]["ApiKey"]
68-
logger.info("Successfully fetching ARK API Key.")
72+
logger.info(f"Successfully fetched ARK API Key (starts with {api_key[:8]}).")
6973
return api_key
7074
except KeyError:
7175
raise ValueError(f"Failed to get ARK api key: {res}")

0 commit comments

Comments
 (0)