mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 21:03:01 +00:00
refactor: standardize logging configuration across NBA and NHL managers
This commit is contained in:
@@ -13,6 +13,13 @@ from src.cache_manager import CacheManager
|
|||||||
# Constants
|
# Constants
|
||||||
ESPN_NBA_SCOREBOARD_URL = "https://site.api.espn.com/apis/site/v2/sports/basketball/nba/scoreboard"
|
ESPN_NBA_SCOREBOARD_URL = "https://site.api.espn.com/apis/site/v2/sports/basketball/nba/scoreboard"
|
||||||
|
|
||||||
|
# Configure logging to match main configuration
|
||||||
|
logging.basicConfig(
|
||||||
|
level=logging.INFO,
|
||||||
|
format='%(asctime)s.%(msecs)03d - %(levelname)s:%(name)s:%(message)s',
|
||||||
|
datefmt='%Y-%m-%d %H:%M:%S'
|
||||||
|
)
|
||||||
|
|
||||||
class BaseNBAManager:
|
class BaseNBAManager:
|
||||||
"""Base class for NBA managers with common functionality."""
|
"""Base class for NBA managers with common functionality."""
|
||||||
# Class variables for warning tracking
|
# Class variables for warning tracking
|
||||||
|
|||||||
@@ -8,10 +8,18 @@ from PIL import Image, ImageDraw, ImageFont
|
|||||||
from pathlib import Path
|
from pathlib import Path
|
||||||
from datetime import datetime, timedelta, timezone
|
from datetime import datetime, timedelta, timezone
|
||||||
from src.display_manager import DisplayManager
|
from src.display_manager import DisplayManager
|
||||||
|
from src.cache_manager import CacheManager
|
||||||
|
|
||||||
# Constants
|
# Constants
|
||||||
ESPN_NHL_SCOREBOARD_URL = "https://site.api.espn.com/apis/site/v2/sports/hockey/nhl/scoreboard"
|
ESPN_NHL_SCOREBOARD_URL = "https://site.api.espn.com/apis/site/v2/sports/hockey/nhl/scoreboard"
|
||||||
|
|
||||||
|
# Configure logging to match main configuration
|
||||||
|
logging.basicConfig(
|
||||||
|
level=logging.INFO,
|
||||||
|
format='%(asctime)s.%(msecs)03d - %(levelname)s:%(name)s:%(message)s',
|
||||||
|
datefmt='%Y-%m-%d %H:%M:%S'
|
||||||
|
)
|
||||||
|
|
||||||
class CacheManager:
|
class CacheManager:
|
||||||
"""Manages caching of ESPN API responses."""
|
"""Manages caching of ESPN API responses."""
|
||||||
_instance = None
|
_instance = None
|
||||||
|
|||||||
Reference in New Issue
Block a user