From be7271760e465c898572746a764b1db373266431 Mon Sep 17 00:00:00 2001 From: Slavi Pantaleev Date: Thu, 21 Nov 2024 18:13:07 +0200 Subject: [PATCH] Make LiveKit Server logging config configurable --- .../matrix-livekit-server/defaults/main.yml | 16 ++++++++++++++++ .../templates/config.yaml.j2 | 6 ++++++ 2 files changed, 22 insertions(+) diff --git a/roles/custom/matrix-livekit-server/defaults/main.yml b/roles/custom/matrix-livekit-server/defaults/main.yml index 5789566dd..38a630a5a 100644 --- a/roles/custom/matrix-livekit-server/defaults/main.yml +++ b/roles/custom/matrix-livekit-server/defaults/main.yml @@ -160,3 +160,19 @@ livekit_server_config_rtc_use_external_ip: true livekit_server_config_keys: "{{ livekit_server_config_keys_auto | combine(livekit_server_config_keys_custom, recursive=True) }}" livekit_server_config_keys_auto: {} livekit_server_config_keys_custom: {} + +# Controls the `logging.level` configuration property. +# Known values: debug, info, warn, error +livekit_server_config_logging_level: info + +# Controls the `logging.pion_level` configuration property +livekit_server_config_logging_pion_level: error + +# Controls the `logging.json` configuration property. +# When set to true, emits json fields. +livekit_server_config_logging_json: false + +# Controls the `logging.sample` configuration property. +# For production setups, enables sampling algorithm. +# See: https://github.com/uber-go/zap/blob/master/FAQ.md#why-sample-application-logs +livekit_server_config_logging_sample: false diff --git a/roles/custom/matrix-livekit-server/templates/config.yaml.j2 b/roles/custom/matrix-livekit-server/templates/config.yaml.j2 index 560dba32d..a9317735c 100644 --- a/roles/custom/matrix-livekit-server/templates/config.yaml.j2 +++ b/roles/custom/matrix-livekit-server/templates/config.yaml.j2 @@ -19,3 +19,9 @@ turn: external_tls: true keys: {{ livekit_server_config_keys | to_json }} + +logging: + level: {{ livekit_server_config_logging_level | to_json }} + pion_level: {{ livekit_server_config_logging_pion_level | to_json }} + json: {{ livekit_server_config_logging_json | to_json }} + sample: {{ livekit_server_config_logging_sample | to_json }}