Skip to content

Commit 6698f42

Browse files
committed
Remove client logging instrumentation
1 parent 27a4a13 commit 6698f42

1 file changed

Lines changed: 2 additions & 11 deletions

File tree

sagemcom_api/client.py

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
from typing import Any
1313
import urllib.parse
1414

15-
import logging
1615
from aiohttp import (
1716
ClientConnectorError,
1817
ClientOSError,
@@ -59,8 +58,6 @@
5958
)
6059
from .models import Device, DeviceInfo, PortMapping
6160

62-
LOGGER = logging.getLogger(__name__)
63-
6461

6562
async def retry_login(invocation: Mapping[str, Any]) -> None:
6663
"""Retry login via backoff if an exception occurs."""
@@ -545,37 +542,31 @@ async def login(self):
545542
"""Login to the router using configured API mode."""
546543
if self.api_mode == ApiMode.REST:
547544
self._active_api_mode = ApiMode.REST
548-
LOGGER.info("API mode forced to REST")
549545
return await self.__rest_login()
550546

551547
if self.api_mode == ApiMode.LEGACY:
552548
self._active_api_mode = ApiMode.LEGACY
553-
LOGGER.info("API mode forced to LEGACY")
554549
return await self.__legacy_login()
555550

556551
# Auto-detect mode: try legacy first, then fall back to REST for newer firmwares.
557552
try:
558553
self._active_api_mode = ApiMode.LEGACY
559554
result = await self.__legacy_login()
560-
LOGGER.info("API mode auto-detected as LEGACY")
561555
return result
562556
except Exception as exception: # pylint: disable=broad-except
563557
if not self.__should_fallback_to_rest(exception):
564558
raise
565559

566560
self._active_api_mode = ApiMode.REST
567-
LOGGER.info("API mode auto-detected as REST")
568561
return await self.__rest_login()
569562

570563
async def logout(self):
571564
"""Log out of the Sagemcom F@st device."""
572565
if self._active_api_mode == ApiMode.REST:
573-
response = await self.__rest_request("POST", "/api/v1/logout", data={"_": ""})
574-
LOGGER.info("REST logout response: %s", response)
566+
await self.__rest_request("POST", "/api/v1/logout", data={"_": ""})
575567
else:
576568
actions = {"id": 0, "method": "logOut"}
577-
response = await self.__api_request_async([actions], False)
578-
LOGGER.info("JSON-REQ logout response: %s", response)
569+
await self.__api_request_async([actions], False)
579570

580571
self._session_id = -1
581572
self._server_nonce = ""

0 commit comments

Comments
 (0)