Upload level exam without hooking up to firestore and running in thread, will do this when I have the edit view done

This commit is contained in:
Carlos Mesquita
2024-08-17 09:29:58 +01:00
parent beccf8b501
commit 03f5b7d72c
19 changed files with 742 additions and 9 deletions

23
modules/helper/logger.py Normal file
View File

@@ -0,0 +1,23 @@
import logging
from functools import wraps
class LoggerHelper:
@staticmethod
def suppress_loggers():
def decorator(f):
@wraps(f)
def wrapped(*args, **kwargs):
root_logger = logging.getLogger()
original_level = root_logger.level
root_logger.setLevel(logging.ERROR)
try:
return f(*args, **kwargs)
finally:
root_logger.setLevel(original_level)
return wrapped
return decorator