Nicer logging configuration.
How the timestamp is logged, and the requests handled by werkzeug too.
This commit is contained in:
parent
43453ff666
commit
ab8b32af7f
@ -94,7 +94,12 @@ import config
|
||||
app.config.from_object(config.Deployment)
|
||||
|
||||
# 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.setLevel(logging.DEBUG if app.config['DEBUG'] else logging.INFO)
|
||||
log.info('Pillar starting')
|
||||
|
@ -39,8 +39,9 @@ def validate(token):
|
||||
payload = dict(
|
||||
token=token)
|
||||
try:
|
||||
r = requests.post("{0}/u/validate_token".format(
|
||||
SystemUtility.blender_id_endpoint()), data=payload)
|
||||
url = "{0}/u/validate_token".format(SystemUtility.blender_id_endpoint())
|
||||
log.debug('POSTing to %r', url)
|
||||
r = requests.post(url, data=payload)
|
||||
except requests.exceptions.ConnectionError as e:
|
||||
raise e
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user