diff --git a/data/actionsmap/yunohost.yml b/data/actionsmap/yunohost.yml index 546f7b504..f8ed8f153 100644 --- a/data/actionsmap/yunohost.yml +++ b/data/actionsmap/yunohost.yml @@ -499,6 +499,14 @@ app: full: --sql help: Initial SQL file + ### app_debug() + debug: + action_help: Display all debug informations for an application + api: GET /apps//debug + arguments: + app: + help: App name + ### app_makedefault() makedefault: action_help: Redirect domain root to an app diff --git a/lib/yunohost/app.py b/lib/yunohost/app.py index 3376a7aad..d4fb7f5d1 100644 --- a/lib/yunohost/app.py +++ b/lib/yunohost/app.py @@ -722,6 +722,19 @@ def app_clearaccess(auth, apps): app_ssowatconf(auth) +def app_debug(app): + with open(apps_setting_path + app + '/manifest.json') as f: + manifest = json.loads(f.read()) + + return { + 'name': manifest['name'], + 'services_logs': [{ + 'service': x, + 'log': service_log(x), + } for x in manifest.get("services", [])] + } + + def app_makedefault(auth, app, domain=None): """ Redirect domain root to an app