matrix/roles/synapse/defaults/main/log.config.yml

89 lines
3.5 KiB
YAML
Raw Normal View History

2024-09-20 12:15:55 +00:00
---
synapse_log_config_root_level: "INFO"
synapse_log_config_disable_existing_loggers: false
# Formatter config
synapse_log_config_formatters_precise_name: precise
synapse_log_config_formatters_precise:
format: >-
%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s
synapse_log_config_formatters: >-
{{
{ synapse_log_config_formatters_precise_name: synapse_log_config_formatters_precise }
}}
# Loggers config
synapse_log_config_loggers_synapse_storage_sql_level: >-
{{ synapse_log_config_root_level }}
synapse_log_config_loggers_synapse_storage_sql:
level: "{{ synapse_log_config_loggers_synapse_storage_sql_level }}"
synapse_log_config_loggers:
"synapse.storage.SQL": "{{ synapse_log_config_loggers_synapse_storage_sql }}"
# File handler
synapse_log_config_handlers_file_name: file
synapse_log_config_handlers_file_class: >-
logging.handlers.TimedRotatingFileHandler
synapse_log_config_handlers_file_formatter: >-
{{ synapse_log_config_formatters_precise_name }}
synapse_log_config_handlers_file_filename: >-
{{ synapse_homeserver_log_path }}
synapse_log_config_handlers_file_when: midnight
synapse_log_config_handlers_file_backup_count: 3
synapse_log_config_handlers_file_encoding: utf8
synapse_log_config_handlers_file:
class: "{{ synapse_log_config_handlers_file_class }}"
formatter: "{{ synapse_log_config_handlers_file_formatter }}"
filename: "{{ synapse_log_config_handlers_file_filename }}"
when: "{{ synapse_log_config_handlers_file_when }}"
backupCount: "{{ synapse_log_config_handlers_file_backup_count }}"
encoding: "{{ synapse_log_config_handlers_file_encoding }}"
# Buffer handler
synapse_log_config_handlers_buffer_name: buffer
synapse_log_config_handlers_buffer_class: >-
synapse.logging.handlers.PeriodicallyFlushingMemoryHandler
synapse_log_config_handlers_buffer_target: file
synapse_log_config_handlers_buffer_capacity: 10
synapse_log_config_handlers_buffer_flush_level: 30
synapse_log_config_handlers_buffer_period: 5
synapse_log_config_handlers_buffer:
class: "{{ synapse_log_config_handlers_buffer_class }}"
target: "{{ synapse_log_config_handlers_buffer_target }}"
capacity: "{{ synapse_log_config_handlers_buffer_capacity }}"
flushLevel: "{{ synapse_log_config_handlers_buffer_flush_level }}"
period: "{{ synapse_log_config_handlers_buffer_period }}"
# Console handler
synapse_log_config_handlers_console_name: console
synapse_log_config_handlers_console_class: logging.StreamHandler
synapse_log_config_handlers_console_formatter: >-
{{ synapse_log_config_formatters_precise_name }}
synapse_log_config_handlers_console:
class: "{{ synapse_log_config_handlers_console_class }}"
formatter: "{{ synapse_log_config_handlers_console_formatter }}"
# Handler config
synapse_log_config_handlers: >-2
{{
{
synapse_log_config_handlers_file_name: synapse_log_config_handlers_file,
synapse_log_config_handlers_buffer_name: synapse_log_config_handlers_buffer,
synapse_log_config_handlers_console_name: synapse_log_config_handlers_console,
}
}}
synapse_log_config_root_handlers:
- "{{ synapse_log_config_handlers_buffer_name }}"
synapse_log_config:
version: 1
formatters: "{{ synapse_log_config_formatters }}"
root:
level: "{{ synapse_log_config_root_level }}"
handlers: "{{ synapse_log_config_root_handlers }}"
handlers: "{{ synapse_log_config_handlers }}"
loggers: "{{ synapse_log_config_loggers }}"
disable_existing_loggers: "{{ synapse_log_config_disable_existing_loggers }}"