From 6131604e49eb2b7eaec1527496ec09f8570dc8f3 Mon Sep 17 00:00:00 2001 From: kyokukou Date: Thu, 11 Jul 2024 07:19:37 -0700 Subject: [PATCH] add debug logging to expires --- search/utils/expires.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/search/utils/expires.py b/search/utils/expires.py index 200a516d..b87c75cc 100644 --- a/search/utils/expires.py +++ b/search/utils/expires.py @@ -1,6 +1,10 @@ from datetime import datetime, timedelta from wsgiref.handlers import format_date_time +import logging + +logger = logging.getLogger(__name__) +logger.setLevel(logging.DEBUG) def gen_search_expires() -> str: """Generate expires in RFC 1123 format. RFC 1123 format ex 'Wed, 21 Oct 2015 07:28:00 GMT' @@ -10,4 +14,5 @@ def gen_search_expires() -> str: now=datetime.now() expire = now + timedelta(minutes=10) expires = format_date_time(expire.timestamp()) + logger.debug(f"now: {now} expire: {expire} expires: {expires}") return expires \ No newline at end of file