diff --git a/cid/log.py b/cid/log.py index 33fca16..9ea36b1 100644 --- a/cid/log.py +++ b/cid/log.py @@ -1,10 +1,12 @@ import logging +from django.conf import settings + from cid.locals import get_cid class CidContextFilter(logging.Filter): def filter(self, record): - record.cid = get_cid() + setattr(record, getattr(settings, 'CID_LOG_RECORD_NAME', 'cid'), get_cid()) return True