mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-10 13:02:59 +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
|
||||
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:
|
||||
"""Base class for NBA managers with common functionality."""
|
||||
# Class variables for warning tracking
|
||||
|
||||
@@ -8,10 +8,18 @@ from PIL import Image, ImageDraw, ImageFont
|
||||
from pathlib import Path
|
||||
from datetime import datetime, timedelta, timezone
|
||||
from src.display_manager import DisplayManager
|
||||
from src.cache_manager import CacheManager
|
||||
|
||||
# Constants
|
||||
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:
|
||||
"""Manages caching of ESPN API responses."""
|
||||
_instance = None
|
||||
|
||||
Reference in New Issue
Block a user