do not encode log message to utf-8 before sending them to the legacy logging framework

This commit is contained in:
Benjamin Dauvergne 2013-06-11 10:11:38 +02:00
parent 5b10aecf3b
commit 8f93c63dc1
1 changed files with 2 additions and 2 deletions

View File

@ -40,9 +40,9 @@ def record(tag, template, using=None, **kwargs):
try:
logger = logging.getLogger('django.journal.%s' % tag)
if tag.name == 'error':
logger.error(message.encode('utf8'))
logger.error(message)
else:
logger.info(message.encode('utf8'))
logger.info(message)
except:
try:
logging.getLogger('django.journal').exception('Unable to log msg')