1 files changed, 10 insertions, 0 deletions
diff --git a/docker/conf/log.config b/docker/conf/log.config
index dc8c70befd..90b5179838 100644
--- a/docker/conf/log.config
+++ b/docker/conf/log.config
@@ -2,7 +2,11 @@ version: 1
formatters:
precise:
+ {% if include_worker_name_in_log_line %}
+ format: '{{ worker_name }} | %(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
+ {% else %}
format: '%(asctime)s - %(name)s - %(lineno)d - %(levelname)s - %(request)s - %(message)s'
+ {% endif %}
handlers:
{% if LOG_FILE_PATH %}
@@ -45,11 +49,17 @@ handlers:
class: logging.StreamHandler
formatter: precise
+{% if not SYNAPSE_LOG_SENSITIVE %}
+{#
+ If SYNAPSE_LOG_SENSITIVE is unset, then override synapse.storage.SQL to INFO
+ so that DEBUG entries (containing sensitive information) are not emitted.
+#}
loggers:
synapse.storage.SQL:
# beware: increasing this to DEBUG will make synapse log sensitive
# information such as access tokens.
level: INFO
+{% endif %}
root:
level: {{ SYNAPSE_LOG_LEVEL or "INFO" }}
|