Fix bug in serialization of logging.LogRecord to show formatted message.

This commit is contained in:
Tyson Clugg 2015-09-22 11:46:50 +10:00
parent d073fe8c77
commit 7cf4bf5c8c

View file

@ -1,6 +1,7 @@
"""Django DDP logging helpers."""
from __future__ import absolute_import, print_function
import datetime
import logging
from dddp import THREAD_LOCAL as this, meteor_random_id, ADDED
@ -18,6 +19,7 @@ class DDPHandler(logging.Handler):
'collection': 'logs',
'id': meteor_random_id('/collection/logs'),
'fields': {
'created': datetime.datetime.fromtimestamp(record.created),
'name': record.name,
'levelno': record.levelno,
'levelname': record.levelname,