diff --git a/awx/main/consumers.py b/awx/main/consumers.py index 4ca8b34380..af39edb107 100644 --- a/awx/main/consumers.py +++ b/awx/main/consumers.py @@ -95,19 +95,16 @@ class BroadcastConsumer(AsyncJsonWebsocketConsumer): try: WebsocketSecretAuthHelper.is_authorized(self.scope) except Exception: - # TODO: log ip of connected client - logger.warn("Broadcast client failed to authorize for reason.") + logger.warn(f"client '{self.channel_name}' failed to authorize against the broadcast endpoint.") await self.close() return - # TODO: log ip of connected client - logger.info(f"Broadcast client connected.") await self.accept() await self.channel_layer.group_add(settings.BROADCAST_WEBSOCKET_GROUP_NAME, self.channel_name) + logger.info(f"client '{self.channel_name}' joined the broadcast group.") async def disconnect(self, code): - # TODO: log ip of disconnected client - logger.info("Client disconnected") + logger.info("client '{self.channel_name}' disconnected from the broadcast group.") await self.channel_layer.group_discard(settings.BROADCAST_WEBSOCKET_GROUP_NAME, self.channel_name) async def internal_message(self, event): diff --git a/awx/settings/defaults.py b/awx/settings/defaults.py index b2e3c23bf0..9fb1e7e6f6 100644 --- a/awx/settings/defaults.py +++ b/awx/settings/defaults.py @@ -1106,9 +1106,9 @@ LOGGING = { 'handlers': ['console', 'file', 'tower_warnings'], 'level': 'WARNING', }, - 'celery': { # for celerybeat connection warnings + 'daphne': { 'handlers': ['console', 'file', 'tower_warnings'], - 'level': 'WARNING', + 'level': 'INFO', }, 'rest_framework.request': { 'handlers': ['console', 'file', 'tower_warnings'], @@ -1139,6 +1139,10 @@ LOGGING = { 'awx.main.dispatch': { 'handlers': ['dispatcher'], }, + 'awx.main.consumers': { + 'handlers': ['console', 'file', 'tower_warnings'], + 'level': 'INFO', + }, 'awx.main.wsbroadcast': { 'handlers': ['wsbroadcast'], },