read and write with readis

This commit is contained in:
root
2025-09-18 11:45:51 +02:00
committed by Magel, Denis
parent cf09ba6431
commit 22419ecf84
5 changed files with 113 additions and 21 deletions

View File

@@ -1,3 +1,4 @@
import logging
import httpx
def round_bytes(size_in_bytes: int) -> str:
@@ -22,3 +23,11 @@ async def get_data_from_ontap(client, logger, hostname: str, username: str, pass
except httpx.HTTPError as e:
logger.error(f"HTTP error occurred: {e}")
return None
def setup_logging() -> None:
"""Configure logging for the application"""
logging.basicConfig(
level=logging.DEBUG,
format="[%(asctime)s] [%(levelname)5s] %(message)s"
)
print(f"Logger is initialized.")