Specific shit for mysql

This commit is contained in:
Alexandre Aubin 2019-11-17 16:59:35 +01:00
parent a7a3e7b6ba
commit 7986f61b14
2 changed files with 5 additions and 1 deletions

View file

@ -9,7 +9,7 @@ metronome:
log: [/var/log/metronome/metronome.log,/var/log/metronome/metronome.err] log: [/var/log/metronome/metronome.log,/var/log/metronome/metronome.err]
needs_exposed_ports: [5222, 5269] needs_exposed_ports: [5222, 5269]
mysql: 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'] alternates: ['mariadb']
nginx: nginx:
log: /var/log/nginx log: /var/log/nginx

View file

@ -408,6 +408,10 @@ def service_log(name, number=50):
# First we always add the logs from journalctl / systemd # First we always add the logs from journalctl / systemd
result["journalctl"] = _get_journalctl_logs(name, int(number)).splitlines() 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): for index, log_path in enumerate(log_list):
log_type = log_type_list[index] log_type = log_type_list[index]