diff --git a/pyasic/miners/backends/bfgminer_goldshell.py b/pyasic/miners/backends/bfgminer_goldshell.py index 74641e49..5d9e81dc 100644 --- a/pyasic/miners/backends/bfgminer_goldshell.py +++ b/pyasic/miners/backends/bfgminer_goldshell.py @@ -18,6 +18,7 @@ from typing import List, Optional from pyasic.config import MinerConfig from pyasic.data import HashBoard from pyasic.errors import APIError +from pyasic.logger import logger from pyasic.miners.backends import BFGMiner from pyasic.web.goldshell import GoldshellWebAPI @@ -138,7 +139,7 @@ class BFGMinerGoldshell(BFGMiner): except KeyError: pass else: - print(self, api_devs) + logger.error(self, api_devs) if not api_devdetails: try: @@ -156,7 +157,7 @@ class BFGMinerGoldshell(BFGMiner): except KeyError: pass else: - print(self, api_devdetails) + logger.error(self, api_devdetails) return hashboards diff --git a/pyasic/miners/backends/vnish.py b/pyasic/miners/backends/vnish.py index a11a40b2..49376896 100644 --- a/pyasic/miners/backends/vnish.py +++ b/pyasic/miners/backends/vnish.py @@ -17,6 +17,7 @@ from typing import Optional from pyasic.errors import APIError +from pyasic.logger import logger from pyasic.miners.backends.bmminer import BMMiner from pyasic.web.vnish import VNishWebAPI @@ -144,7 +145,7 @@ class VNish(BMMiner): float(float(api_summary["SUMMARY"][0]["GHS 5s"]) / 1000), 2 ) except (IndexError, KeyError, ValueError, TypeError) as e: - print(e) + logger.error(e) pass async def get_wattage_limit(self, web_settings: dict = None) -> Optional[int]: diff --git a/pyasic/miners/base.py b/pyasic/miners/base.py index a815e6a0..6fbfcdc0 100644 --- a/pyasic/miners/base.py +++ b/pyasic/miners/base.py @@ -24,6 +24,7 @@ import asyncssh from pyasic.config import MinerConfig from pyasic.data import Fan, HashBoard, MinerData from pyasic.data.error_codes import MinerErrorData +from pyasic.logger import logger class BaseMiner(ABC): @@ -397,7 +398,7 @@ class BaseMiner(ABC): if fn_args[arg_name].get("web"): web_multicommand.append(fn_args[arg_name]["web"]) except KeyError as e: - print(e, data_name) + logger.error(e, data_name) continue api_multicommand = list(set(api_multicommand)) diff --git a/pyasic/web/bosminer.py b/pyasic/web/bosminer.py index 978953ef..33495bae 100644 --- a/pyasic/web/bosminer.py +++ b/pyasic/web/bosminer.py @@ -146,8 +146,6 @@ class BOSMinerWebAPI(BaseWebAPI): data = await client.get( f"http://{self.ip}{path}", headers={"User-Agent": "BTC Tools v0.1"} ) - print(data.status_code) - print(data.text) if data.status_code == 200: return data.json() if ignore_errors: