feat : design 单品新增 镜像旋转功能
All checks were successful
git commit AiDA python develop 分支构建部署 / scheduled_deploy (push) Has been skipped

This commit is contained in:
zcr
2026-01-06 12:00:58 +08:00
parent 4951fab71a
commit c18f45e549
4 changed files with 53 additions and 7 deletions

View File

@@ -1,10 +1,15 @@
import os
from app.core.config import settings
LOGGER_CONFIG_DICT = {
'version': 1,
'disable_existing_loggers': False,
'formatters': {
'simple': {'format': '%(asctime)s %(filename)s [line:%(lineno)d] %(levelname)s %(message)s'}
'simple': {
'format': '%(asctime)s %(filename)s [line:%(lineno)d] %(levelname)s %(message)s',
'datefmt': '%Y-%m-%d %H:%M:%S' # 补充日期格式,日志更易读
}
},
'handlers': {
'console': {
@@ -17,7 +22,7 @@ LOGGER_CONFIG_DICT = {
'class': 'logging.handlers.RotatingFileHandler',
'level': 'INFO',
'formatter': 'simple',
'filename': f'{settings.LOGS_PATH}info.log',
'filename': os.path.join(settings.LOGS_PATH, 'info.log'),
'maxBytes': 10485760,
'backupCount': 50,
'encoding': 'utf8',
@@ -26,7 +31,7 @@ LOGGER_CONFIG_DICT = {
'class': 'logging.handlers.RotatingFileHandler',
'level': 'ERROR',
'formatter': 'simple',
'filename': f'{settings.LOGS_PATH}error.log',
'filename': os.path.join(settings.LOGS_PATH, 'error.log'),
'maxBytes': 10485760,
'backupCount': 20,
'encoding': 'utf8',
@@ -35,7 +40,7 @@ LOGGER_CONFIG_DICT = {
'class': 'logging.handlers.RotatingFileHandler',
'level': 'DEBUG',
'formatter': 'simple',
'filename': f'{settings.LOGS_PATH}debug.log',
'filename': os.path.join(settings.LOGS_PATH, 'debug.log'),
'maxBytes': 10485760,
'backupCount': 50,
'encoding': 'utf8',
@@ -45,7 +50,7 @@ LOGGER_CONFIG_DICT = {
'my_module': {'level': 'INFO', 'handlers': ['console'], 'propagate': 'no'}
},
'root': {
'level': 'INFO',
'level': 'DEBUG',
'handlers': ['error_file_handler', 'info_file_handler', 'debug_file_handler', 'console'],
},
}