Skip to content

Commit

Permalink
🔊 Improve log when no clients loaded (#288)
Browse files Browse the repository at this point in the history
  • Loading branch information
mraniki authored Mar 29, 2024
2 parents 85891d1 + fc86305 commit 87effa1
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion iamlistening/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ def __init__(self):
self.enabled = settings.iamlistening_enabled or True
# Create a mapping of library names to client classes
self.client_classes = self.get_all_client_classes()
logger.debug("client_classes available {}", self.client_classes)
# logger.debug("client_classes available {}", self.client_classes)

if not self.enabled:
logger.info("Module is disabled. No clients will be created.")
Expand All @@ -82,6 +82,10 @@ def __init__(self):

# Log the number of clients that were created
logger.info(f"Loaded {len(self.clients)} clients")
if not self.clients:
logger.warning(
"No clients were created. Check your settings or disable the module."
)

def _create_client(self, **kwargs):
"""
Expand Down

0 comments on commit 87effa1

Please sign in to comment.