erased old logger
This commit is contained in:
parent
21e30b4ac0
commit
5201aabe2b
|
@ -4,7 +4,6 @@ DEMO=true
|
||||||
DEBUG=true
|
DEBUG=true
|
||||||
ALLOWED_HOSTS=localhost,localhost:8000,127.0.0.1,
|
ALLOWED_HOSTS=localhost,localhost:8000,127.0.0.1,
|
||||||
|
|
||||||
DEVICE_LOG_PATH=/tmp
|
|
||||||
STATIC_ROOT=/tmp/static/
|
STATIC_ROOT=/tmp/static/
|
||||||
MEDIA_ROOT=/tmp/media/
|
MEDIA_ROOT=/tmp/media/
|
||||||
EMAIL_HOST="mail.example.org"
|
EMAIL_HOST="mail.example.org"
|
||||||
|
|
|
@ -177,7 +177,6 @@ class DeleteStateDefinitionView(AdminView, StateDefinitionContextMixin, SuccessM
|
||||||
success_url = reverse_lazy('admin:states_panel')
|
success_url = reverse_lazy('admin:states_panel')
|
||||||
|
|
||||||
def get_success_message(self, cleaned_data):
|
def get_success_message(self, cleaned_data):
|
||||||
device_logger.info(f"<Deleted> StateDefinition with value {self.object.state} by user {self.request.user}.")
|
|
||||||
return f'State definition: {self.object.state}, has been deleted'
|
return f'State definition: {self.object.state}, has been deleted'
|
||||||
|
|
||||||
def delete(self, request, *args, **kwargs):
|
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})")
|
_log.append(f"{state_definition.state} (ID: {lookup_id} -> Order: {current_order})")
|
||||||
current_order += 1
|
current_order += 1
|
||||||
|
|
||||||
device_logger.info(
|
|
||||||
f"<Updated Order> State order updated by user {self.request.user}: {', '.join(_log)}"
|
|
||||||
)
|
|
||||||
messages.success(self.request, _("Order changed succesfuly."))
|
messages.success(self.request, _("Order changed succesfuly."))
|
||||||
return redirect(self.success_url)
|
return redirect(self.success_url)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -223,12 +223,6 @@ LOGGING = {
|
||||||
"class": "logging.StreamHandler",
|
"class": "logging.StreamHandler",
|
||||||
"formatter": "colored"
|
"formatter": "colored"
|
||||||
},
|
},
|
||||||
'device_log_file': {
|
|
||||||
'level': 'INFO',
|
|
||||||
'class': 'logging.FileHandler',
|
|
||||||
'filename': DEVICE_LOG_PATH + "/device_changes.log",
|
|
||||||
'formatter': 'verbose',
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
"root": {
|
"root": {
|
||||||
"handlers": ["console"],
|
"handlers": ["console"],
|
||||||
|
@ -245,11 +239,6 @@ LOGGING = {
|
||||||
"level": "ERROR",
|
"level": "ERROR",
|
||||||
"propagate": False,
|
"propagate": False,
|
||||||
},
|
},
|
||||||
'device_log': {
|
|
||||||
'handlers': ['device_log_file'],
|
|
||||||
'level': 'INFO',
|
|
||||||
'propagate': False,
|
|
||||||
},
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue