Skip to content

Commit

Permalink
minor logging changes
Browse files Browse the repository at this point in the history
  • Loading branch information
jmushtaq committed Apr 20, 2020
1 parent 90fc37e commit 78d94db
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ledger/accounts/mail.py
Expand Up @@ -3,6 +3,8 @@
from django.core.urlresolvers import reverse
from django.template import loader

import logging
logger = logging.getLogger('log')

# Send mail validation to user, the email should include a link to continue the
# auth process. This is a simple example, it could easily be extended to
Expand All @@ -15,3 +17,5 @@ def send_validation(strategy, backend, code, partial_token=None):

send_mail('Your login URL for the customer portal', template,
settings.DEFAULT_FROM_EMAIL, [code.email], fail_silently=False)

logger.info('Login token sent: {}'.format(url))
6 changes: 6 additions & 0 deletions ledger/settings_base.py
Expand Up @@ -275,6 +275,12 @@
'level': 'INFO',
'propagate': True
},
'commercialoperator': {
'handlers': ['file'],
'level': 'INFO',
'propagate': True
},

# 'oscar.checkout': {
# 'handlers': ['file'],
# 'level': 'INFO'
Expand Down

0 comments on commit 78d94db

Please sign in to comment.