From 156e92a4cd509f07d7695ff576a60dfd0d533d85 Mon Sep 17 00:00:00 2001 From: Marcel Vriend <92307684+marcelvriend@users.noreply.github.com> Date: Fri, 12 Jul 2024 16:09:44 +0200 Subject: [PATCH] Fix too verbose HTTP logging for Azure Data Explorer (#121802) --- homeassistant/components/azure_data_explorer/client.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/homeassistant/components/azure_data_explorer/client.py b/homeassistant/components/azure_data_explorer/client.py index 88609ff8e10..9fb22dfe974 100644 --- a/homeassistant/components/azure_data_explorer/client.py +++ b/homeassistant/components/azure_data_explorer/client.py @@ -65,13 +65,18 @@ class AzureDataExplorerClient: ) if data[CONF_USE_QUEUED_CLIENT] is True: - # Queded is the only option supported on free tear of ADX + # Queued is the only option supported on free tier of ADX self.write_client = QueuedIngestClient(kcsb_ingest) else: self.write_client = ManagedStreamingIngestClient.from_dm_kcsb(kcsb_ingest) self.query_client = KustoClient(kcsb_query) + # Reduce the HTTP logging, the default INFO logging is too verbose. + logging.getLogger("azure.core.pipeline.policies.http_logging_policy").setLevel( + logging.WARNING + ) + def test_connection(self) -> None: """Test connection, will throw Exception if it cannot connect.""" @@ -80,7 +85,7 @@ class AzureDataExplorerClient: self.query_client.execute_query(self._database, query) def ingest_data(self, adx_events: str) -> None: - """Send data to Axure Data Explorer.""" + """Send data to Azure Data Explorer.""" bytes_stream = io.StringIO(adx_events) stream_descriptor = StreamDescriptor(bytes_stream) -- GitLab