From 5ce2732899aea2c35903333b4c783ea7124292ef Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Wed, 20 Jul 2022 13:03:50 +0300 Subject: [PATCH] Make maubot logging level configurable Related to https://github.com/spantaleev/matrix-docker-ansible-deploy/pull/1894 --- roles/matrix-bot-maubot/defaults/main.yml | 3 +++ roles/matrix-bot-maubot/templates/config/config.yaml.j2 | 8 ++++---- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/roles/matrix-bot-maubot/defaults/main.yml b/roles/matrix-bot-maubot/defaults/main.yml index c6d92215..376af188 100644 --- a/roles/matrix-bot-maubot/defaults/main.yml +++ b/roles/matrix-bot-maubot/defaults/main.yml @@ -57,6 +57,9 @@ matrix_bot_maubot_management_interface_http_bind_port: '' matrix_bot_maubot_port: 29316 matrix_bot_maubot_unshared_secret: 'generate' +# Specifies the default log level for all bot loggers. +matrix_bot_maubot_logging_level: WARNING + # A list of extra arguments to pass to the container matrix_bot_maubot_container_extra_arguments: [] diff --git a/roles/matrix-bot-maubot/templates/config/config.yaml.j2 b/roles/matrix-bot-maubot/templates/config/config.yaml.j2 index ef46fe76..041522f8 100644 --- a/roles/matrix-bot-maubot/templates/config/config.yaml.j2 +++ b/roles/matrix-bot-maubot/templates/config/config.yaml.j2 @@ -97,11 +97,11 @@ logging: formatter: colored loggers: maubot: - level: DEBUG + level: {{ matrix_bot_maubot_logging_level|to_json }} mau: - level: DEBUG + level: {{ matrix_bot_maubot_logging_level|to_json }} aiohttp: - level: INFO + level: {{ matrix_bot_maubot_logging_level|to_json }} root: - level: DEBUG + level: {{ matrix_bot_maubot_logging_level|to_json }} handlers: [console]