测试logger记录日志

This commit is contained in:
haotian 2025-07-28 09:57:05 +08:00
parent 7470dd2bd8
commit e58f10478b
2 changed files with 4 additions and 1 deletions

View File

@ -12,7 +12,7 @@ APP_PORT = 9099
# 应用版本
APP_VERSION= '1.6.2'
# 应用是否开启热重载
APP_RELOAD = true
APP_RELOAD = false
# 应用是否开启IP归属区域查询
APP_IP_LOCATION_QUERY = true
# 应用是否允许账号同时登录

View File

@ -8,6 +8,7 @@ from sqlalchemy.ext.asyncio import AsyncSession
from module_admin.annotation.log_annotation import Log
from config.enums import BusinessType, RedisInitKeyConfig
from utils.response_util import ResponseUtil
from utils.log_util import logger
testController = APIRouter(prefix='/test')
@ -37,6 +38,8 @@ async def hello_post_json(
user_name = await TestService.get_user_name(query_db, login_info)
logger.info("测试成功")
return ResponseUtil.success(model_content=user_name)
@Log(title='测试post_form_data', business_type=BusinessType.OTHER, log_type='post')