Fix logs view in superuser panel
This seems to have been broken ever since we moved to syslog
This commit is contained in:
parent
92c0a05ec1
commit
33b31a2451
2 changed files with 5 additions and 5 deletions
|
@ -47,14 +47,14 @@ class SuperUserGetLogsForService(ApiResource):
|
|||
abort(404)
|
||||
|
||||
try:
|
||||
with open(app.config['SYSTEM_SERVICE_LOGS_PATH'] % service, 'r') as f:
|
||||
logs = f.read()
|
||||
with open(app.config['SYSTEM_LOGS_FILE'], 'r') as f:
|
||||
logs = f.readlines()
|
||||
except Exception as ex:
|
||||
logger.exception('Cannot read logs')
|
||||
abort(400)
|
||||
|
||||
return {
|
||||
'logs': logs
|
||||
'logs': '\n'.join([log for log in logs if log.find(service + '[') >= 0])
|
||||
}
|
||||
|
||||
abort(403)
|
||||
|
|
Reference in a new issue