From 7986f61b14b68d8cad505e0ead49971ad984514f Mon Sep 17 00:00:00 2001 From: Alexandre Aubin Date: Sun, 17 Nov 2019 16:59:35 +0100 Subject: [PATCH] Specific shit for mysql --- data/templates/yunohost/services.yml | 2 +- src/yunohost/service.py | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/data/templates/yunohost/services.yml b/data/templates/yunohost/services.yml index c2f57c245..b3c406f0f 100644 --- a/data/templates/yunohost/services.yml +++ b/data/templates/yunohost/services.yml @@ -9,7 +9,7 @@ metronome: log: [/var/log/metronome/metronome.log,/var/log/metronome/metronome.err] needs_exposed_ports: [5222, 5269] mysql: - log: [/var/log/mysql.log,/var/log/mysql.err] + log: [/var/log/mysql.log,/var/log/mysql.err,/var/log/mysql/error.log] alternates: ['mariadb'] nginx: log: /var/log/nginx diff --git a/src/yunohost/service.py b/src/yunohost/service.py index f43d7cca5..548d1efda 100644 --- a/src/yunohost/service.py +++ b/src/yunohost/service.py @@ -408,6 +408,10 @@ def service_log(name, number=50): # First we always add the logs from journalctl / systemd result["journalctl"] = _get_journalctl_logs(name, int(number)).splitlines() + # Mysql and journalctl are fucking annoying, we gotta explictly fetch mariadb ... + if name == "mysql": + result["journalctl"] = _get_journalctl_logs("mariadb", int(number)).splitlines() + for index, log_path in enumerate(log_list): log_type = log_type_list[index]