refactor: replace DefaultLimitOffsetPage with LimitOffsetPage in multiple files and update timezone handling to use UTC

This commit is contained in:
Abhimanyu Saharan
2026-02-09 20:40:17 +05:30
parent 1f105c19ab
commit 020d02fa22
51 changed files with 302 additions and 192 deletions

View File

@@ -7,7 +7,7 @@ import logging
import os
import sys
import time
from datetime import datetime, timezone
from datetime import UTC, datetime
from types import TracebackType
from typing import Any
@@ -128,7 +128,7 @@ class JsonFormatter(logging.Formatter):
payload: dict[str, Any] = {
"timestamp": datetime.fromtimestamp(
record.created,
tz=timezone.utc,
tz=UTC,
).isoformat(),
"level": record.levelname,
"logger": record.name,
@@ -153,6 +153,7 @@ class JsonFormatter(logging.Formatter):
class KeyValueFormatter(logging.Formatter):
"""Formatter that appends extra fields as `key=value` pairs."""
# noinspection PyMethodMayBeStatic
def format(self, record: logging.LogRecord) -> str:
"""Render a log line with appended non-standard record fields."""
base = super().format(record)