rework most of the logging

This commit is contained in:
jonaswinkler
2021-02-05 01:10:29 +01:00
parent 6ed228aa18
commit e5a7dc0cc7
18 changed files with 80 additions and 71 deletions

View File

@@ -58,6 +58,9 @@ from .serialisers import (
)
logger = logging.getLogger("paperless.api")
class IndexView(TemplateView):
template_name = "index.html"
@@ -488,7 +491,7 @@ class SearchView(APIView):
try:
doc = Document.objects.get(id=r['id'])
except Document.DoesNotExist:
logging.getLogger(__name__).warning(
logger.warning(
f"Search index returned a non-existing document: "
f"id: {r['id']}, title: {r['title']}. "
f"Search index needs reindex."