Fix logger error (#2643)

### What problem does this PR solve?

Fix logger error: AttributeError: 'Logger' object has no attribute
'basicConfig'

### Type of change

- [x] Bug Fix (non-breaking change which fixes an issue)
This commit is contained in:
yqkcn 2024-09-29 09:49:59 +08:00 committed by GitHub
parent a44ed9626a
commit e82e8fde13
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -52,12 +52,11 @@ cron_logger = getLogger("cron_logger")
chunk_logger = getLogger("chunk_logger") chunk_logger = getLogger("chunk_logger")
database_logger = getLogger("database") database_logger = getLogger("database")
formatter = logging.Formatter("%(asctime)-15s %(levelname)-8s (%(process)d) %(message)s")
for logger in [es_logger, minio_logger, s3_logger, azure_logger, cron_logger, chunk_logger, database_logger]: for logger in [es_logger, minio_logger, s3_logger, azure_logger, cron_logger, chunk_logger, database_logger]:
logger.basicConfig( logger.setLevel(logging.INFO)
level=logging.INFO, for handler in logger.handlers:
format="%(asctime)-15s %(levelname)-8s (%(process)d) %(message)s", handler.setFormatter(fmt=formatter)
)
SVR_QUEUE_NAME = "rag_flow_svr_queue" SVR_QUEUE_NAME = "rag_flow_svr_queue"
SVR_QUEUE_RETENTION = 60*60 SVR_QUEUE_RETENTION = 60*60