Added a logging utility class and supplemented, standardized the logging output for all modules.

This commit is contained in:
戒酒的李白
2025-01-27 18:09:30 +08:00
parent 1288b5f0be
commit c62f2b2a8e
13 changed files with 469 additions and 189 deletions
+1 -11
View File
@@ -5,17 +5,7 @@ import matplotlib.pyplot as plt
from PIL import Image
import numpy as np
import pymysql
import logging
# Configure logging
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s [%(levelname)s] %(message)s',
handlers=[
logging.FileHandler("wordcloud_generator.log"),
logging.StreamHandler()
]
)
from utils.logger import app_logger as logging
# Global cache for stop words
STOP_WORDS = set()