[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
|
- src: mtx-storage-1.lta.internal.ru.com:/srv/nfs_synapse
|
||||||
path: /mnt
|
path: /mnt
|
||||||
mtx-syna-2.lta.internal.ru.com:
|
mtx-syna-2.lta.internal.ru.com:
|
||||||
|
matrix_service: "synapse"
|
||||||
nfs:
|
nfs:
|
||||||
mounts:
|
mounts:
|
||||||
- src: mtx-storage-1.lta.internal.ru.com:/srv/nfs_synapse
|
- 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
|
# A yaml python logging config file as described by
|
||||||
# https://docs.python.org/3.7/library/logging.config.html#configuration-dictionary-schema
|
# 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 ##
|
## 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:
|
tags:
|
||||||
- nginx
|
- nginx
|
||||||
- synapse
|
- 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:
|
file:
|
||||||
class: logging.handlers.TimedRotatingFileHandler
|
class: logging.handlers.TimedRotatingFileHandler
|
||||||
formatter: fmt
|
formatter: fmt
|
||||||
filename: /logs/homeserver.log
|
filename: /logs/worker-{{ item }}.log
|
||||||
when: midnight
|
when: midnight
|
||||||
backupCount: 3
|
backupCount: 3
|
||||||
encoding: utf8
|
encoding: utf8
|
Loading…
Reference in a new issue