Nicer logging configuration.
How the timestamp is logged, and the requests handled by werkzeug too.
This commit is contained in:
@@ -94,7 +94,12 @@ import config
|
|||||||
app.config.from_object(config.Deployment)
|
app.config.from_object(config.Deployment)
|
||||||
|
|
||||||
# Configure logging
|
# Configure logging
|
||||||
logging.basicConfig(level=logging.WARNING)
|
logging.basicConfig(
|
||||||
|
level=logging.WARNING,
|
||||||
|
format='%(asctime)-15s %(levelname)8s %(name)s %(message)s')
|
||||||
|
|
||||||
|
logging.getLogger('werkzeug').setLevel(logging.INFO)
|
||||||
|
|
||||||
log = logging.getLogger(__name__)
|
log = logging.getLogger(__name__)
|
||||||
log.setLevel(logging.DEBUG if app.config['DEBUG'] else logging.INFO)
|
log.setLevel(logging.DEBUG if app.config['DEBUG'] else logging.INFO)
|
||||||
log.info('Pillar starting')
|
log.info('Pillar starting')
|
||||||
|
@@ -39,8 +39,9 @@ def validate(token):
|
|||||||
payload = dict(
|
payload = dict(
|
||||||
token=token)
|
token=token)
|
||||||
try:
|
try:
|
||||||
r = requests.post("{0}/u/validate_token".format(
|
url = "{0}/u/validate_token".format(SystemUtility.blender_id_endpoint())
|
||||||
SystemUtility.blender_id_endpoint()), data=payload)
|
log.debug('POSTing to %r', url)
|
||||||
|
r = requests.post(url, data=payload)
|
||||||
except requests.exceptions.ConnectionError as e:
|
except requests.exceptions.ConnectionError as e:
|
||||||
raise e
|
raise e
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user