mirror of
https://github.com/paperless-ngx/paperless-ngx.git
synced 2025-12-13 18:17:02 +01:00
Removed log components and introduced signals for tags & correspondents
This commit is contained in:
parent
49b56425e8
commit
b92e007e15
12 changed files with 175 additions and 140 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue