调整日志格式
This commit is contained in:
@@ -20,7 +20,7 @@ def get_private_url(key, bucket=BUCKET):
|
|||||||
UCLOUD_LOGGER.warning(f"查询{key}时uCloud连接失败!")
|
UCLOUD_LOGGER.warning(f"查询{key}时uCloud连接失败!")
|
||||||
raise ConnectionError("uCloud连接失败")
|
raise ConnectionError("uCloud连接失败")
|
||||||
if resp.status_code != 200:
|
if resp.status_code != 200:
|
||||||
UCLOUD_LOGGER.warning(f"({bucket})中未找到({key})! status: {resp.status_code} error: {resp.error}")
|
UCLOUD_LOGGER.warning(f"[{bucket}]中未找到({key})! status: {resp.status_code} error: {resp.error}")
|
||||||
return None
|
return None
|
||||||
|
|
||||||
# 获取公有空间下载url
|
# 获取公有空间下载url
|
||||||
@@ -41,7 +41,7 @@ def copy_file(source_bucket, source_key, target_bucket, target_key):
|
|||||||
return False
|
return False
|
||||||
if resp.status_code != 200:
|
if resp.status_code != 200:
|
||||||
UCLOUD_LOGGER.warning(
|
UCLOUD_LOGGER.warning(
|
||||||
f"将({source_key})从({source_bucket})拷贝到({target_bucket})失败! status: {resp.status_code} error: {resp.error}"
|
f"将({source_key})从[{source_bucket}]拷贝到[{target_bucket}]失败! status: {resp.status_code} error: {resp.error}"
|
||||||
)
|
)
|
||||||
return False
|
return False
|
||||||
return True
|
return True
|
||||||
|
|||||||
Reference in New Issue
Block a user