Removed log components and introduced signals for tags & correspondents

This commit is contained in:
Daniel Quinn
2016-03-28 11:11:15 +01:00
parent 49b56425e8
commit b92e007e15
12 changed files with 175 additions and 140 deletions

View File

@@ -11,18 +11,11 @@ class PaperlessLogger(logging.StreamHandler):
logging.StreamHandler.emit(self, record)
if not hasattr(record, "component"):
return
# We have to do the import here or Django will barf when it tries to
# load this because the apps aren't loaded at that point
from .models import Log
kwargs = {
"message": record.msg,
"component": record.component,
"level": record.levelno,
}
kwargs = {"message": record.msg, "level": record.levelno}
if hasattr(record, "group"):
kwargs["group"] = record.group