Skip to content

Commit

Permalink
fix: loglevel for errors in min.io storage.py
Browse files Browse the repository at this point in the history
  • Loading branch information
venkatamutyala committed Jan 8, 2025
1 parent 0fdd00e commit 2ef0d37
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions app/util/storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ def initialize_minio_client():
)
return client
except Exception as e:
logger.info(f"Failed to initialize MinIO client: {e}")
logger.error(f"Failed to initialize MinIO client: {e}")
raise


Expand Down Expand Up @@ -148,7 +148,7 @@ def list_buckets(client):
buckets = client.list_buckets()
return buckets
except S3Error as e:
logger.info(f"Error listing buckets: {e}")
logger.error(f"Error listing buckets: {e}")
raise

def find_buckets_containing(base_name, buckets):
Expand Down Expand Up @@ -181,9 +181,9 @@ def delete_all_objects(client, bucket_name):
if result.status_code == 204:
logger.info(f"Deleted object: {result.object_name}")
elif result.status_code != 204:
logger.info(f"Failed to delete object: {result.object_name}, Status Code: {result.status_code}")
logger.error(f"Failed to delete object: {result.object_name}, Status Code: {result.status_code}")
except S3Error as e:
logger.info(f"Error deleting objects in bucket '{bucket_name}': {e}")
logger.error(f"Error deleting objects in bucket '{bucket_name}': {e}")
raise

def delete_bucket(client, bucket_name):
Expand All @@ -203,7 +203,7 @@ def delete_bucket(client, bucket_name):
client.remove_bucket(bucket_name)
logger.info(f"Bucket '{bucket_name}' has been deleted successfully.")
except S3Error as e:
logger.info(f"Error removing bucket '{bucket_name}': {e}")
logger.error(f"Error removing bucket '{bucket_name}': {e}")
raise

def create_bucket(client, bucket_name):
Expand Down

0 comments on commit 2ef0d37

Please sign in to comment.