read and write with readis
This commit is contained in:
@@ -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.")
|
||||
|
||||
Reference in New Issue
Block a user