Skip to content

Commit

Permalink
Fix logger error (#2643)
Browse files Browse the repository at this point in the history
### 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)
  • Loading branch information
yqkcn authored Sep 29, 2024
1 parent a44ed96 commit e82e8fd
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions rag/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,11 @@
chunk_logger = getLogger("chunk_logger")
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]:
logger.basicConfig(
level=logging.INFO,
format="%(asctime)-15s %(levelname)-8s (%(process)d) %(message)s",
)

logger.setLevel(logging.INFO)
for handler in logger.handlers:
handler.setFormatter(fmt=formatter)

SVR_QUEUE_NAME = "rag_flow_svr_queue"
SVR_QUEUE_RETENTION = 60*60
Expand Down

0 comments on commit e82e8fd

Please sign in to comment.