mirror of
https://github.com/ChuckBuilds/LEDMatrix.git
synced 2026-04-14 14:33:00 +00:00
Configure calendar manager logger to show DEBUG messages
This commit is contained in:
@@ -13,8 +13,9 @@ from rgbmatrix import graphics
|
|||||||
import pytz
|
import pytz
|
||||||
from src.config_manager import ConfigManager
|
from src.config_manager import ConfigManager
|
||||||
|
|
||||||
# Get logger without configuring
|
# Configure logger for this module
|
||||||
logger = logging.getLogger(__name__)
|
logger = logging.getLogger(__name__)
|
||||||
|
logger.setLevel(logging.DEBUG) # Set to DEBUG to see all messages
|
||||||
|
|
||||||
class CalendarManager:
|
class CalendarManager:
|
||||||
def __init__(self, matrix, canvas, config):
|
def __init__(self, matrix, canvas, config):
|
||||||
@@ -43,11 +44,13 @@ class CalendarManager:
|
|||||||
try:
|
try:
|
||||||
self.timezone = pytz.timezone(timezone_str)
|
self.timezone = pytz.timezone(timezone_str)
|
||||||
except pytz.UnknownTimeZoneError:
|
except pytz.UnknownTimeZoneError:
|
||||||
logging.warning(f"Unknown timezone '{timezone_str}' in config, defaulting to UTC.")
|
logger.warning(f"Unknown timezone '{timezone_str}' in config, defaulting to UTC.")
|
||||||
self.timezone = pytz.utc
|
self.timezone = pytz.utc
|
||||||
|
|
||||||
if self.enabled:
|
if self.enabled:
|
||||||
self.authenticate()
|
self.authenticate()
|
||||||
|
else:
|
||||||
|
logger.warning("Calendar manager is disabled in configuration")
|
||||||
|
|
||||||
# Display properties
|
# Display properties
|
||||||
self.text_color = (255, 255, 255) # White
|
self.text_color = (255, 255, 255) # White
|
||||||
|
|||||||
Reference in New Issue
Block a user