From 4bcfd6b2eeb7c69dc5a3b7fa1dd43f7f57fd5519 Mon Sep 17 00:00:00 2001 From: moanos Date: Thu, 30 May 2024 09:26:04 +0200 Subject: [PATCH] feat: Add logging config --- notfellchen.cfg | 4 ++++ src/fellchensammlung/__init__.py | 2 ++ src/fellchensammlung/views.py | 3 +++ 3 files changed, 9 insertions(+) diff --git a/notfellchen.cfg b/notfellchen.cfg index 4abc78b..4dbf270 100644 --- a/notfellchen.cfg +++ b/notfellchen.cfg @@ -19,4 +19,8 @@ media=./media [mail] console-only=true +[logging] +app_log_level=INFO +django_log_level=INFO + diff --git a/src/fellchensammlung/__init__.py b/src/fellchensammlung/__init__.py index e69de29..33bfc63 100644 --- a/src/fellchensammlung/__init__.py +++ b/src/fellchensammlung/__init__.py @@ -0,0 +1,2 @@ +import logging +logger = logging.getLogger("fellchensammlung") diff --git a/src/fellchensammlung/views.py b/src/fellchensammlung/views.py index 8242e7c..fde99af 100644 --- a/src/fellchensammlung/views.py +++ b/src/fellchensammlung/views.py @@ -1,3 +1,5 @@ +import logging + from django.http import HttpResponseRedirect from django.shortcuts import render, redirect from django.urls import reverse @@ -7,6 +9,7 @@ from django.utils import translation from .mail import mail_admins_new_report from notfellchen import settings +from fellchensammlung import logger from fellchensammlung.models import AdoptionNotice, Text, Animal, Rule, Image, Report, ModerationAction, \ Member from .forms import AdoptionNoticeForm, AnimalForm, ImageForm, ReportForm