From c3fb7ebf4c3167015df27c496764904f4b39fc64 Mon Sep 17 00:00:00 2001 From: Noah Fleischmann Date: Mon, 21 Oct 2019 20:06:57 +0200 Subject: [PATCH] Add variable for mxisd verbose logging --- roles/matrix-mxisd/defaults/main.yml | 9 +++++++-- .../templates/systemd/matrix-mxisd.service.j2 | 3 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/roles/matrix-mxisd/defaults/main.yml b/roles/matrix-mxisd/defaults/main.yml index 40eab830e..fbc378dba 100644 --- a/roles/matrix-mxisd/defaults/main.yml +++ b/roles/matrix-mxisd/defaults/main.yml @@ -13,13 +13,13 @@ matrix_mxisd_data_path: "{{ matrix_mxisd_base_path }}/data" # Controls whether the matrix-mxisd container exposes its HTTP port (tcp/8090 in the container). # # Takes an ":" or "" value (e.g. "127.0.0.1:8090"), or empty string to not expose. -matrix_mxisd_container_http_host_bind_port: '' +matrix_mxisd_container_http_host_bind_port: "" # A list of extra arguments to pass to the container matrix_mxisd_container_extra_arguments: [] # List of systemd services that matrix-mxisd.service depends on -matrix_mxisd_systemd_required_services_list: ['docker.service'] +matrix_mxisd_systemd_required_services_list: ["docker.service"] # List of systemd services that matrix-mxisd.service wants matrix_mxisd_systemd_wanted_services_list: [] @@ -68,6 +68,11 @@ matrix_mxisd_threepid_medium_email_custom_matrixid_template: "" # Controls whether the self-check feature should validate SSL certificates. matrix_mxisd_self_check_validate_certificates: true +# Controls mxisd logging verbosity for troubleshooting. +# +# According to: https://github.com/kamax-matrix/mxisd/blob/master/docs/troubleshooting.md#increase-verbosity +matrix_mxisd_verbose_logging: true + # Default mxisd configuration template which covers the generic use case. # You can customize it by controlling the various variables inside it. # diff --git a/roles/matrix-mxisd/templates/systemd/matrix-mxisd.service.j2 b/roles/matrix-mxisd/templates/systemd/matrix-mxisd.service.j2 index 09ebb05d1..d60740f52 100644 --- a/roles/matrix-mxisd/templates/systemd/matrix-mxisd.service.j2 +++ b/roles/matrix-mxisd/templates/systemd/matrix-mxisd.service.j2 @@ -26,6 +26,9 @@ ExecStart=/usr/bin/docker run --rm --name matrix-mxisd \ {% if matrix_mxisd_container_http_host_bind_port %} -p {{ matrix_mxisd_container_http_host_bind_port }}:8090 \ {% endif %} + {% if matrix_mxisd_verbose_logging %} + -e MXISD_LOG_LEVEL=debug \ + {% endif %} -v {{ matrix_mxisd_config_path }}:/etc/mxisd:ro \ -v {{ matrix_mxisd_data_path }}:/var/mxisd:rw \ {% for arg in matrix_mxisd_container_extra_arguments %}