From 5201aabe2b7e1e19e4d0e1102d6846a998b539c4 Mon Sep 17 00:00:00 2001 From: Thomas Rusiecki Date: Fri, 20 Dec 2024 15:22:06 -0300 Subject: [PATCH] erased old logger --- .env.example | 1 - admin/views.py | 4 ---- dhub/settings.py | 11 ----------- 3 files changed, 16 deletions(-) diff --git a/.env.example b/.env.example index 935710c..ed60e95 100644 --- a/.env.example +++ b/.env.example @@ -4,7 +4,6 @@ DEMO=true DEBUG=true ALLOWED_HOSTS=localhost,localhost:8000,127.0.0.1, -DEVICE_LOG_PATH=/tmp STATIC_ROOT=/tmp/static/ MEDIA_ROOT=/tmp/media/ EMAIL_HOST="mail.example.org" diff --git a/admin/views.py b/admin/views.py index 105dc69..5b2c0cc 100644 --- a/admin/views.py +++ b/admin/views.py @@ -177,7 +177,6 @@ class DeleteStateDefinitionView(AdminView, StateDefinitionContextMixin, SuccessM success_url = reverse_lazy('admin:states_panel') def get_success_message(self, cleaned_data): - device_logger.info(f" StateDefinition with value {self.object.state} by user {self.request.user}.") return f'State definition: {self.object.state}, has been deleted' def delete(self, request, *args, **kwargs): @@ -209,9 +208,6 @@ class UpdateStateOrderView(AdminView, TemplateView): _log.append(f"{state_definition.state} (ID: {lookup_id} -> Order: {current_order})") current_order += 1 - device_logger.info( - f" State order updated by user {self.request.user}: {', '.join(_log)}" - ) messages.success(self.request, _("Order changed succesfuly.")) return redirect(self.success_url) else: diff --git a/dhub/settings.py b/dhub/settings.py index 0ad95f8..55337e8 100644 --- a/dhub/settings.py +++ b/dhub/settings.py @@ -223,12 +223,6 @@ LOGGING = { "class": "logging.StreamHandler", "formatter": "colored" }, - 'device_log_file': { - 'level': 'INFO', - 'class': 'logging.FileHandler', - 'filename': DEVICE_LOG_PATH + "/device_changes.log", - 'formatter': 'verbose', - }, }, "root": { "handlers": ["console"], @@ -245,11 +239,6 @@ LOGGING = { "level": "ERROR", "propagate": False, }, - 'device_log': { - 'handlers': ['device_log_file'], - 'level': 'INFO', - 'propagate': False, - }, } }