answer-grading-app / utils.py
yamanavijayavardhan's picture
fix circular call
fce85c0
raw
history blame
519 Bytes
import queue
import logging
import sys
# Create notification queue
notification_queue = queue.Queue()
# Setup logging
logging.basicConfig(
level=logging.INFO,
format='%(asctime)s - %(levelname)s - %(message)s',
handlers=[logging.StreamHandler(sys.stdout)]
)
logger = logging.getLogger(__name__)
def log_print(message, level="INFO"):
if level == "INFO":
logger.info(message)
elif level == "ERROR":
logger.error(message)
elif level == "WARNING":
logger.warning(message)