diff options
| author | Alex Schofield <git@ajschof.me> | 2024-08-20 15:15:02 +0100 |
|---|---|---|
| committer | Alex Schofield <git@ajschof.me> | 2024-08-20 15:15:02 +0100 |
| commit | 2a914add8391f345ee1096b9deb729c05d3e06c3 (patch) | |
| tree | be25eebf24a7ac5aef53c3fb14dda9958b3cc99f /src/extract_lambda.py | |
| parent | 983430f661bd89a406693d48b464b3120604f2dd (diff) | |
| download | de-project-bentley-2a914add8391f345ee1096b9deb729c05d3e06c3.tar.gz de-project-bentley-2a914add8391f345ee1096b9deb729c05d3e06c3.zip | |
feat: add more logging for debugging
Diffstat (limited to 'src/extract_lambda.py')
| -rw-r--r-- | src/extract_lambda.py | 7 |
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: |
