Disable debug logs in superuser panel when under multiple instances

They don't work anyway (since logs will be loaded from random instances), so we just disable them
This commit is contained in:
Joseph Schorr 2017-05-24 14:34:29 -04:00
parent c55c233f1f
commit 9518f1d045
3 changed files with 41 additions and 18 deletions

View file

@ -3,6 +3,7 @@
import logging
import os
import string
import socket
import pathvalidate
@ -72,6 +73,7 @@ class SuperUserGetLogsForService(ApiResource):
abort(400)
return {
'instance': socket.gethostname(),
'logs': '\n'.join(logs)
}
@ -91,6 +93,7 @@ class SuperUserSystemLogServices(ApiResource):
""" List the system logs for the current system. """
if SuperUserPermission().can():
return {
'instance': socket.gethostname(),
'services': list(get_services())
}
@ -900,7 +903,7 @@ class SuperUserCustomCertificate(ApiResource):
abort(400)
logger.debug('Saving custom certificate %s', certpath)
cert_full_path = config_provider.get_volume_path(EXTRA_CA_DIRECTORY, certpath)
cert_full_path = config_provider.get_volume_path(EXTRA_CA_DIRECTORY, certpath)
config_provider.save_volume_file(cert_full_path, uploaded_file)
logger.debug('Saved custom certificate %s', certpath)