aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAlex Schofield <git@ajschof.me>2024-08-20 15:15:02 +0100
committerAlex Schofield <git@ajschof.me>2024-08-20 15:15:02 +0100
commit2a914add8391f345ee1096b9deb729c05d3e06c3 (patch)
treebe25eebf24a7ac5aef53c3fb14dda9958b3cc99f /src
parent983430f661bd89a406693d48b464b3120604f2dd (diff)
downloadde-project-bentley-2a914add8391f345ee1096b9deb729c05d3e06c3.tar.gz
de-project-bentley-2a914add8391f345ee1096b9deb729c05d3e06c3.zip
feat: add more logging for debugging
Diffstat (limited to 'src')
-rw-r--r--src/extract_lambda.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/extract_lambda.py b/src/extract_lambda.py
index e9f438b..24f0981 100644
--- a/src/extract_lambda.py
+++ b/src/extract_lambda.py
@@ -10,13 +10,16 @@ from botocore.exceptions import ClientError
from pg8000.native import Connection, InterfaceError, identifier
logger = logging.getLogger(__name__)
+
logging.basicConfig(
format="{asctime} - {levelname} - {message}",
style="{",
datefmt="%Y-%m-%d %H:%M",
- level=logging.INFO,
+ level=logging.DEBUG,
)
+logging.getLogger("botocore").setLevel(logging.WARNING)
+
class DBConnectionException(Exception):
"""Wraps pg8000.native Error or DatabaseError."""
@@ -110,7 +113,7 @@ def list_existing_s3_files(bucket_name=extract_bucket(), client=boto3.client("s3
results of listing the contents of the s3 bucket, then
returns the populated dictionary
"""
-
+ logging.info("Listing existing S3 files")
existing_files = {}
try:
git.ajschof.me — hosted by ajschofield — powered by cgit