From 16d3d0e3fefa6c5fc6025a37a5ce9579af7a3189 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Fri, 27 Dec 2024 10:22:02 -0500 Subject: [PATCH 1/3] Update docs/configuring-playbook-bridge-wechat.md: add the section "Extending the configuration" Signed-off-by: Suguru Hirahara --- docs/configuring-playbook-bridge-wechat.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/docs/configuring-playbook-bridge-wechat.md b/docs/configuring-playbook-bridge-wechat.md index 0016cbdd9..85374cde0 100644 --- a/docs/configuring-playbook-bridge-wechat.md +++ b/docs/configuring-playbook-bridge-wechat.md @@ -12,6 +12,15 @@ To enable the bridge, add the following configuration to your `inventory/host_va matrix_wechat_enabled: true ``` +### Extending the configuration + +There are some additional things you may wish to configure about the bridge. + +Take a look at: + +- `roles/custom/matrix-bridge-wechat/defaults/main.yml` for some variables that you can customize via your `vars.yml` file +- `roles/custom/matrix-bridge-wechat/templates/config.yaml.j2` for the bridge's default configuration. You can override settings (even those that don't have dedicated playbook variables) using the `matrix_wechat_configuration_extension_yaml` variable + ## Installing After configuring the playbook, run it with [playbook tags](playbook-tags.md) as below: From 855ba5581a16620f417505713f0107bf54b93394 Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Mon, 27 Jan 2025 00:40:15 +0900 Subject: [PATCH 2/3] Update files for matrix-bridge-wechat: add the common section "Troubleshooting" Signed-off-by: Suguru Hirahara --- docs/configuring-playbook-bridge-wechat.md | 13 +++++++++++++ roles/custom/matrix-bridge-wechat/defaults/main.yml | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/docs/configuring-playbook-bridge-wechat.md b/docs/configuring-playbook-bridge-wechat.md index 85374cde0..e885b2a55 100644 --- a/docs/configuring-playbook-bridge-wechat.md +++ b/docs/configuring-playbook-bridge-wechat.md @@ -43,3 +43,16 @@ ansible-playbook -i inventory/hosts setup.yml --tags=setup-all,ensure-matrix-use To use the bridge, you need to start a chat with `@wechatbot:example.com` (where `example.com` is your base domain, not the `matrix.` domain). Send `help` to the bot to see the available commands. + +## Troubleshooting + +As with all other services, you can find the logs in [systemd-journald](https://www.freedesktop.org/software/systemd/man/systemd-journald.service.html) by logging in to the server with SSH and running `journalctl -fu matrix-bridge-wechat`. + +### Increase logging verbosity + +The default logging level for this component is `warn`. If you want to increase the verbosity, add the following configuration to your `vars.yml` file and re-run the playbook: + +```yaml +# Valid values: debug, info, warn, error, fatal +matrix_wechat_log_level: 'debug' +``` diff --git a/roles/custom/matrix-bridge-wechat/defaults/main.yml b/roles/custom/matrix-bridge-wechat/defaults/main.yml index 1ca0c910f..fae7f2b47 100644 --- a/roles/custom/matrix-bridge-wechat/defaults/main.yml +++ b/roles/custom/matrix-bridge-wechat/defaults/main.yml @@ -95,7 +95,7 @@ matrix_wechat_encryption_allow: "{{ matrix_bridges_encryption_enabled }}" matrix_wechat_encryption_default: "{{ matrix_wechat_encryption_allow }}" # Minimum severity of journal log messages. -# Options: debug, info, warn, error, fatal +# Valid values: debug, info, warn, error, fatal matrix_wechat_log_level: 'warn' matrix_wechat_permissions: | From aaf76adbd74c4c38fe1a42e2e0f2eed7bb8931ce Mon Sep 17 00:00:00 2001 From: Suguru Hirahara Date: Mon, 27 Jan 2025 00:43:06 +0900 Subject: [PATCH 3/3] Update files for matrix-bridge-wechat: sort the logging verbosity levels Signed-off-by: Suguru Hirahara --- docs/configuring-playbook-bridge-wechat.md | 2 +- roles/custom/matrix-bridge-wechat/defaults/main.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/configuring-playbook-bridge-wechat.md b/docs/configuring-playbook-bridge-wechat.md index e885b2a55..aa4ce17e5 100644 --- a/docs/configuring-playbook-bridge-wechat.md +++ b/docs/configuring-playbook-bridge-wechat.md @@ -53,6 +53,6 @@ As with all other services, you can find the logs in [systemd-journald](https:// The default logging level for this component is `warn`. If you want to increase the verbosity, add the following configuration to your `vars.yml` file and re-run the playbook: ```yaml -# Valid values: debug, info, warn, error, fatal +# Valid values: fatal, error, warn, info, debug matrix_wechat_log_level: 'debug' ``` diff --git a/roles/custom/matrix-bridge-wechat/defaults/main.yml b/roles/custom/matrix-bridge-wechat/defaults/main.yml index fae7f2b47..4c9d9f0b0 100644 --- a/roles/custom/matrix-bridge-wechat/defaults/main.yml +++ b/roles/custom/matrix-bridge-wechat/defaults/main.yml @@ -95,7 +95,7 @@ matrix_wechat_encryption_allow: "{{ matrix_bridges_encryption_enabled }}" matrix_wechat_encryption_default: "{{ matrix_wechat_encryption_allow }}" # Minimum severity of journal log messages. -# Valid values: debug, info, warn, error, fatal +# Valid values: fatal, error, warn, info, debug matrix_wechat_log_level: 'warn' matrix_wechat_permissions: |