logger = logging.getLogger(__name__)
#logger.setLevel(logging.DEBUG)
+# "Cached" configuration values
+_write_error_log = config.get("write_error_log")
+
def add(domain: str, error: dict) -> None:
logger.debug("domain='%s',error[]='%s' - CALLED!", domain, type(error))
domain_helper.raise_on(domain)
if blacklist.is_blacklisted(domain):
raise ValueError(f"domain='{domain}' is blacklisted but function was invoked")
- elif not config.get("write_error_log"):
+ elif not _write_error_log:
logger.debug("Writing to error_log is disabled in configuruation file - EXIT!")
return