mirror of
https://github.com/bellingcat/auto-archiver-api.git
synced 2026-06-08 03:28:35 +03:00
do not require logs for testing, and redis allow vm.overcommit_memory
This commit is contained in:
@@ -1,18 +1,20 @@
|
||||
import os
|
||||
import traceback
|
||||
|
||||
from auto_archiver.utils.custom_logger import logger
|
||||
|
||||
|
||||
# logging configurations
|
||||
logger.add(
|
||||
"logs/all_logs.log", retention="30 days", format="{extra[serialized]}"
|
||||
)
|
||||
logger.add(
|
||||
"logs/all_error_logs.log",
|
||||
retention="120 days",
|
||||
level="ERROR",
|
||||
format="{extra[serialized]}",
|
||||
)
|
||||
if not os.getenv("TESTING", "").lower() == "true":
|
||||
logger.add(
|
||||
"logs/all_logs.log", retention="60 days", format="{extra[serialized]}"
|
||||
)
|
||||
logger.add(
|
||||
"logs/all_error_logs.log",
|
||||
retention="120 days",
|
||||
level="ERROR",
|
||||
format="{extra[serialized]}",
|
||||
)
|
||||
|
||||
|
||||
def log_error(e: Exception, traceback_str: str = None, extra: str = ""):
|
||||
|
||||
Reference in New Issue
Block a user