Logging has been enabled, if you want to have logging output there are 3 ways it
can be used. If you have logging settings you are currently using and you don't
want them to change you can set log_enabled=True and logging output will follow
your defined logging. If you are not familiar with how to setup logging settings
we have pre-defined settings for you to use. In addition to setting log_enabled
to true, if you want the logging output to a file set log_file_name to the name
and location you want logging output to. If no value is provided logging will be
sent to the console. The log_levels that can be set are "CRITICAL"; "ERROR";
"WARNING"; "INFO"; "DEBUG"; "NOTSET". In the SDK, only DEBUG is used.
log_file_name and log_level are set to None by default.
log_enabled is set to False.
Below is an example of how you can enable logging and output to a file. For
additional settings for client please see the client example above.
python
from pay_with_amazon.client import PayWithAmazonClient
client = PayWithAmazonClient(
mws_access_key=session['mws_access_key'],
mws_secret_key=session['mws_secret_key'],
merchant_id=session['merchant_id'],
sandbox=True,
region='na',
currency_code='USD',
log_enabled=True,
log_file_name="log.txt",
log_level="DEBUG")