调整日志格式

This commit is contained in:
2024-07-23 09:45:43 +08:00
parent a6c9a13c6e
commit 352aecf69d

View File

@@ -20,7 +20,7 @@ def get_private_url(key, bucket=BUCKET):
UCLOUD_LOGGER.warning(f"查询{key}时uCloud连接失败!")
raise ConnectionError("uCloud连接失败")
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
# 获取公有空间下载url
@@ -41,7 +41,7 @@ def copy_file(source_bucket, source_key, target_bucket, target_key):
return False
if resp.status_code != 200:
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 True