mirror of
https://github.com/jazzband/django-ddp.git
synced 2026-03-16 22:40:24 +00:00
Fix bug in serialization of logging.LogRecord to show formatted message.
This commit is contained in:
parent
d073fe8c77
commit
7cf4bf5c8c
1 changed files with 2 additions and 0 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue