统一引号格式,优化架构排布
This commit is contained in:
@@ -5,7 +5,7 @@ import socket
|
||||
HOSTNAME = socket.gethostname()
|
||||
# 检测日志文件的路径是否存在,不存在则创建
|
||||
LOG_PATHS = [
|
||||
f"log/{HOSTNAME}/error",
|
||||
f'log/{HOSTNAME}/error',
|
||||
]
|
||||
for path in LOG_PATHS:
|
||||
if not os.path.exists(path):
|
||||
|
||||
@@ -14,7 +14,7 @@ def process_request(func):
|
||||
result = func(*args, **kwargs)
|
||||
return jsonify(result), 200
|
||||
except Exception as e:
|
||||
logging.getLogger("error").error(e, exc_info=e)
|
||||
logging.getLogger('error').error(e, exc_info=e)
|
||||
return jsonify({'error': str(e)}), 500
|
||||
|
||||
return wrapper
|
||||
|
||||
Reference in New Issue
Block a user