Created
September 20, 2017 19:24
-
-
Save shentonfreude/44a47d2721b322d15f28d6e2445f9e0e to your computer and use it in GitHub Desktop.
AWS boto debug logging config suggested by AWS
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import boto3 | |
import botocore | |
from time import gmtime, strftime | |
FORMAT = "[%(levelname)s %(asctime)s %(filename)s:%(lineno)s - %(funcName)21s() ] %(message)s" | |
DATEFMT= strftime("%%Y%m%dT%H%M%SZ", gmtime()) logging.basicConfig(level=logging.DEBUG, format=FORMAT, datefmt=DATEFMT) | |
logger = logging.getLogger(__name__) | |
boto3_log = logging.getLogger("boto3") | |
boto3_log.setLevel(logging.DEBUG) | |
boto3_log.propagate = True | |
botocore_log = logging.getLogger("botocore") | |
botocore_log.setLevel(logging.DEBUG) | |
botocore_log.propagate = True |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment