[synapse] start refactoring for lab
This commit is contained in:
parent
b867417cfb
commit
9660cb9a51
7 changed files with 18 additions and 128 deletions
|
@ -68,6 +68,7 @@ runa:
|
|||
- src: mtx-storage-1.lta.internal.ru.com:/srv/nfs_synapse
|
||||
path: /mnt
|
||||
mtx-syna-2.lta.internal.ru.com:
|
||||
matrix_service: "synapse"
|
||||
nfs:
|
||||
mounts:
|
||||
- src: mtx-storage-1.lta.internal.ru.com:/srv/nfs_synapse
|
||||
|
|
|
@ -828,7 +828,7 @@ database:
|
|||
# A yaml python logging config file as described by
|
||||
# https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema
|
||||
#
|
||||
log_config: "/config/log.yaml"
|
||||
log_config: "/config/log-homeserver.yaml"
|
||||
|
||||
|
||||
## Ratelimiting ##
|
||||
|
|
|
@ -1,42 +0,0 @@
|
|||
version: 1
|
||||
|
||||
formatters:
|
||||
fmt:
|
||||
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s- %(message)s'
|
||||
|
||||
filters:
|
||||
context:
|
||||
(): synapse.logging.context.LoggingContextFilter
|
||||
request: ""
|
||||
|
||||
handlers:
|
||||
console:
|
||||
class: logging.StreamHandler
|
||||
formatter: fmt
|
||||
filters: [context]
|
||||
file:
|
||||
class: logging.handlers.TimedRotatingFileHandler
|
||||
formatter: fmt
|
||||
filename: /logs/worker-federation.log
|
||||
when: midnight
|
||||
backupCount: 3
|
||||
encoding: utf8
|
||||
|
||||
root:
|
||||
level: INFO
|
||||
handlers:
|
||||
- console
|
||||
- file
|
||||
|
||||
loggers:
|
||||
synapse:
|
||||
level: INFO
|
||||
|
||||
synapse.storage.SQL:
|
||||
level: INFO
|
||||
|
||||
ldap3:
|
||||
level: INFO
|
||||
|
||||
ldap_auth_provider:
|
||||
level: INFO
|
|
@ -1,42 +0,0 @@
|
|||
version: 1
|
||||
|
||||
formatters:
|
||||
fmt:
|
||||
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s- %(message)s'
|
||||
|
||||
filters:
|
||||
context:
|
||||
(): synapse.logging.context.LoggingContextFilter
|
||||
request: ""
|
||||
|
||||
handlers:
|
||||
console:
|
||||
class: logging.StreamHandler
|
||||
formatter: fmt
|
||||
filters: [context]
|
||||
file:
|
||||
class: logging.handlers.TimedRotatingFileHandler
|
||||
formatter: fmt
|
||||
filename: /logs/worker-generic.log
|
||||
when: midnight
|
||||
backupCount: 3
|
||||
encoding: utf8
|
||||
|
||||
root:
|
||||
level: INFO
|
||||
handlers:
|
||||
- console
|
||||
- file
|
||||
|
||||
loggers:
|
||||
synapse:
|
||||
level: INFO
|
||||
|
||||
synapse.storage.SQL:
|
||||
level: INFO
|
||||
|
||||
ldap3:
|
||||
level: INFO
|
||||
|
||||
ldap_auth_provider:
|
||||
level: INFO
|
|
@ -1,42 +0,0 @@
|
|||
version: 1
|
||||
|
||||
formatters:
|
||||
fmt:
|
||||
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s- %(message)s'
|
||||
|
||||
filters:
|
||||
context:
|
||||
(): synapse.logging.context.LoggingContextFilter
|
||||
request: ""
|
||||
|
||||
handlers:
|
||||
console:
|
||||
class: logging.StreamHandler
|
||||
formatter: fmt
|
||||
filters: [context]
|
||||
file:
|
||||
class: logging.handlers.TimedRotatingFileHandler
|
||||
formatter: fmt
|
||||
filename: /logs/worker-sync.log
|
||||
when: midnight
|
||||
backupCount: 3
|
||||
encoding: utf8
|
||||
|
||||
root:
|
||||
level: INFO
|
||||
handlers:
|
||||
- console
|
||||
- file
|
||||
|
||||
loggers:
|
||||
synapse:
|
||||
level: INFO
|
||||
|
||||
synapse.storage.SQL:
|
||||
level: INFO
|
||||
|
||||
ldap3:
|
||||
level: INFO
|
||||
|
||||
ldap_auth_provider:
|
||||
level: INFO
|
|
@ -25,3 +25,18 @@
|
|||
tags:
|
||||
- nginx
|
||||
- synapse
|
||||
|
||||
- name: Create log configurations
|
||||
ansible.builtin.template:
|
||||
src: "nginx/synapse.conf"
|
||||
dest: /home/{{ ansible_user }}/docker_compose/{{ matrix_service }}/config/log-{{ item }}.conf
|
||||
owner: "{{ ansible_user }}"
|
||||
mode: '0644'
|
||||
tags:
|
||||
- log
|
||||
- synapse
|
||||
loop:
|
||||
- worker-generic
|
||||
- worker-federation
|
||||
- worker-sync
|
||||
- homeserver
|
||||
|
|
|
@ -17,7 +17,7 @@ handlers:
|
|||
file:
|
||||
class: logging.handlers.TimedRotatingFileHandler
|
||||
formatter: fmt
|
||||
filename: /logs/homeserver.log
|
||||
filename: /logs/worker-{{ item }}.log
|
||||
when: midnight
|
||||
backupCount: 3
|
||||
encoding: utf8
|
Loading…
Reference in a new issue