erased old logger
This commit is contained in:
parent
2605844dd4
commit
92419b89d0
|
@ -5,7 +5,6 @@ DEMO=true
|
||||||
DEBUG=true
|
DEBUG=true
|
||||||
DPP=false
|
DPP=false
|
||||||
|
|
||||||
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:
|
||||||
|
|
|
@ -228,12 +228,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"],
|
||||||
|
@ -250,11 +244,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