Skip to content

Commit

Permalink
ABS logs
Browse files Browse the repository at this point in the history
  • Loading branch information
moxarth-rathod committed May 8, 2024
1 parent a0c0e5b commit 22bfb35
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions connectors/sources/azure_blob_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,7 @@ async def get_content(self, blob, timestamp=None, doit=None):
if not self.can_file_be_downloaded(file_extension, filename, file_size):
return

self._logger.debug(f"Downloading content for file: {filename}")
document = {"_id": blob["id"], "_timestamp": blob["_timestamp"]}
return await self.download_and_extract_file(
document,
Expand All @@ -194,6 +195,9 @@ async def get_content(self, blob, timestamp=None, doit=None):
)

async def blob_download_func(self, blob_name, container_name):
self._logger.debug(
f"Downloading content for blob: {blob_name} from {container_name} container"
)
async with BlobClient.from_connection_string(
conn_str=self.connection_string,
container_name=container_name,
Expand All @@ -212,6 +216,7 @@ async def get_container(self, container_list):
Yields:
dictionary: Container document with name & metadata
"""
self._logger.debug("Fetching containers")
container_set = set(container_list)
async with BlobServiceClient.from_connection_string(
conn_str=self.connection_string, retry_total=self.retry_count
Expand Down Expand Up @@ -247,6 +252,7 @@ async def get_blob(self, container):
Yields:
dictionary: Formatted blob document
"""
self._logger.info(f"Fetching blobs for '{container['name']}' container")
async with ContainerClient.from_connection_string(
conn_str=self.connection_string,
container_name=container["name"],
Expand Down

0 comments on commit 22bfb35

Please sign in to comment.